#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
// #include "asr_config.h"
#include <aos/aos.h>
#include "wm_infrared.h"
#include "app_main.h"
#include "app_beep.h"

#define LEARN_CACHE_BUF 1024

#define DATA_FLASH_KEY "2021-01-14"

REMOTE_PARA_T remote_data; //空调遥控索引
AIR_STA_T air_sta_data;    //空调遥控状态

static unsigned int *learn_ptr_data = NULL; //红外学习数据
static unsigned int ret_len = 0;            //红外学习数据长度（int）
unsigned char *remote_ptr_data = NULL;      //遥控码数据

REMOTE_PARA_T remote_fan_data; //风扇遥控索引

static unsigned char air_index_data[] =
    {
        0x11, 0xd1, 0x0f, 0x5e, 0x00, 0x43, 0x00, 0x00, 0x00, 0x48, 0x00, 0x9b, 0x00, 0x4d, 0x00, 0xaa,
        0x00, 0x52, 0x00, 0xf8, 0x00, 0x57, 0x00, 0x23, 0x01, 0x5c, 0x00, 0x55, 0x01, 0x61, 0x00, 0xe2,
        0x01, 0x70, 0x00, 0x22, 0x02, 0x7f, 0x00, 0x69, 0x02, 0x84, 0x00, 0x94, 0x02, 0x89, 0x00, 0x9c,
        0x02, 0x8e, 0x00, 0x25, 0x04, 0x93, 0x00, 0x3b, 0x04, 0xa2, 0x00, 0x4a, 0x04, 0xbb, 0x00, 0x6e,
        0x04, 0xc5, 0x00, 0x76, 0x04, 0xd4, 0x00, 0x93, 0x04, 0xde, 0x00, 0xef, 0x04, 0xed, 0x00, 0xe5,
        0x05, 0xf2, 0x00, 0x10, 0x06, 0xf7, 0x00, 0x1f, 0x06, 0xfc, 0x00, 0x51, 0x06, 0x0b, 0x01, 0x67,
        0x06, 0x10, 0x01, 0x92, 0x06, 0x15, 0x01, 0xf5, 0x06, 0x1a, 0x01, 0xfd, 0x06, 0x1f, 0x01, 0x05,
        0x07, 0x24, 0x01, 0x14, 0x07, 0x2e, 0x01, 0x1c, 0x07, 0x33, 0x01, 0x32, 0x07, 0x38, 0x01, 0x41,
        0x07, 0x3d, 0x01, 0xc7, 0x07, 0x42, 0x01, 0xf2, 0x07, 0x47, 0x01, 0x0f, 0x08, 0x51, 0x01, 0x1e,
        0x08, 0x7e, 0x01, 0x57, 0x08, 0x83, 0x01, 0x66, 0x08, 0x88, 0x01, 0xad, 0x08, 0x92, 0x01, 0xd1,
        0x08, 0x97, 0x01, 0xe7, 0x08, 0x9c, 0x01, 0x12, 0x09, 0xb0, 0x01, 0x4b, 0x09, 0xba, 0x01, 0x68,
        0x09, 0xbf, 0x01, 0xbd, 0x09, 0xc4, 0x01, 0xcc, 0x09, 0xc9, 0x01, 0xe9, 0x09, 0xd8, 0x01, 0xf8,
        0x09, 0xdd, 0x01, 0x2a, 0x0a, 0xe2, 0x01, 0x71, 0x0a, 0x14, 0x02, 0x87, 0x0a, 0x19, 0x02, 0x9d,
        0x0a, 0x1e, 0x02, 0xba, 0x0a, 0x23, 0x02, 0xd7, 0x0a, 0x32, 0x02, 0x25, 0x0b, 0x4b, 0x02, 0x3b,
        0x0b, 0x50, 0x02, 0x74, 0x0b, 0x55, 0x02, 0x7c, 0x0b, 0x5a, 0x02, 0x84, 0x0b, 0x5f, 0x02, 0x93,
        0x0b, 0x87, 0x02, 0x9b, 0x0b, 0x8c, 0x02, 0xaa, 0x0b, 0x96, 0x02, 0xea, 0x0b, 0xa0, 0x02, 0xf2,
        0x0b, 0xb9, 0x02, 0x08, 0x0c, 0xc3, 0x02, 0x10, 0x0c, 0xc8, 0x02, 0x18, 0x0c, 0xeb, 0x02, 0x20,
        0x0c, 0xf0, 0x02, 0xad, 0x0c, 0xf5, 0x02, 0xed, 0x0c, 0xfa, 0x02, 0xfc, 0x0c, 0xf2, 0x03, 0x04,
        0x0d, 0x24, 0x04, 0x1a, 0x0d, 0x29, 0x04, 0x22, 0x0d, 0x47, 0x04, 0x54, 0x0d, 0xa1, 0x04, 0x63,
        0x0d, 0xa6, 0x04, 0x72, 0x0d, 0xf1, 0x04, 0x88, 0x0d, 0xf6, 0x04, 0x90, 0x0d, 0x19, 0x05, 0x9f,
        0x0d, 0x28, 0x05, 0xae, 0x0d, 0x37, 0x05, 0xb6, 0x0d, 0x55, 0x05, 0xcc, 0x0d, 0x78, 0x05, 0xdb,
        0x0d, 0x7d, 0x05, 0xea, 0x0d, 0x8c, 0x05, 0xf2, 0x0d, 0xc8, 0x05, 0x01, 0x0e, 0xcd, 0x05, 0x09,
        0x0e, 0xd2, 0x05, 0x11, 0x0e, 0xdc, 0x05, 0x19, 0x0e, 0x1d, 0x06, 0x28, 0x0e, 0x59, 0x06, 0x30,
        0x0e, 0x77, 0x06, 0x3f, 0x0e, 0x9f, 0x06, 0x47, 0x0e, 0xd8, 0x06, 0x4f, 0x0e, 0x16, 0x02, 0x00,
        0x00, 0x00, 0x00, 0xdc, 0x4e, 0xc9, 0x1c, 0xcb, 0xc3, 0x27, 0x49, 0x31, 0x05, 0x14, 0x5d, 0x58,
        0x12, 0xdc, 0x4e, 0x0e, 0x13, 0x60, 0x5e, 0x0f, 0xdc, 0x4e, 0xd1, 0x2b, 0x7b, 0x17, 0x33, 0xf1,
        0x3f, 0x61, 0x00, 0x9a, 0x9b, 0x00, 0x0f, 0x21, 0x34, 0x16, 0xcb, 0x5b, 0x1b, 0x26, 0x3f, 0xd9,
        0x00, 0xe3, 0x46, 0x01, 0xdc, 0x4e, 0xcf, 0x00, 0xc7, 0xf9, 0x00, 0x0d, 0x2c, 0xd3, 0x01, 0x6f,
        0x1f, 0x02, 0x40, 0x12, 0xd4, 0x00, 0xd4, 0x25, 0x01, 0x0f, 0x21, 0x2c, 0x16, 0x41, 0xf8, 0x19,
        0xdc, 0x4e, 0x97, 0x01, 0x0e, 0xc7, 0x01, 0x40, 0x12, 0x14, 0x02, 0x3f, 0x65, 0x02, 0x40, 0x12,
        0x2f, 0x16, 0x0f, 0xa4, 0x1a, 0xdc, 0x4e, 0xfb, 0x01, 0xff, 0x52, 0x02, 0x40, 0x12, 0x40, 0x16,
        0x7a, 0xf7, 0x1b, 0xdc, 0x4e, 0x48, 0x00, 0xdc, 0x4e, 0x00, 0x70, 0x2f, 0xe7, 0x01, 0xbf, 0x40,
        0x02, 0x40, 0x12, 0xce, 0x01, 0x2f, 0x0d, 0x02, 0x40, 0x12, 0x19, 0x02, 0x7f, 0x77, 0x02, 0x40,
        0x12, 0xb0, 0x01, 0x6e, 0xe3, 0x01, 0x47, 0x09, 0x02, 0xed, 0x00, 0xbf, 0x95, 0x01, 0x3d, 0x13,
        0xdd, 0x01, 0xaf, 0x31, 0x02, 0x10, 0x0f, 0x0b, 0x52, 0x00, 0x5a, 0x8d, 0x00, 0x40, 0x0e, 0x27,
        0x14, 0x95, 0xe6, 0x12, 0x5d, 0x0b, 0xaa, 0x11, 0x92, 0xc2, 0x0b, 0x9c, 0x07, 0xd6, 0x1c, 0xea,
        0x19, 0x28, 0x40, 0x0e, 0xee, 0x18, 0x1e, 0x08, 0x22, 0x40, 0x0e, 0x16, 0x19, 0x5e, 0x16, 0x22,
        0x40, 0x0e, 0xe8, 0x15, 0x44, 0xbc, 0x18, 0x4d, 0x10, 0xe4, 0x18, 0xde, 0xf9, 0x21, 0x40, 0x0e,
        0x81, 0x14, 0xa6, 0xf3, 0x16, 0x5d, 0x0b, 0xc7, 0x13, 0x49, 0x38, 0x12, 0x40, 0x0e, 0xf4, 0x16,
        0xfb, 0x13, 0x1e, 0x4d, 0x10, 0x06, 0x70, 0x00, 0x30, 0xc8, 0x00, 0xa3, 0x22, 0x7f, 0x1e, 0xd1,
        0x0e, 0x2d, 0xa3, 0x22, 0xbf, 0x01, 0x4f, 0xf3, 0x01, 0xf0, 0x0c, 0xc4, 0x01, 0x3f, 0x00, 0x02,
        0xf0, 0x0c, 0xb5, 0x01, 0xb5, 0xec, 0x01, 0x9a, 0x06, 0x9b, 0x02, 0x0b, 0xb5, 0x02, 0x84, 0x1f,
        0x07, 0x4d, 0x00, 0x4c, 0x7e, 0x00, 0x0e, 0x0f, 0xa6, 0x01, 0x4e, 0xd9, 0x01, 0x20, 0x0a, 0x06,
        0x01, 0xfc, 0xa8, 0x01, 0xaa, 0x07, 0x91, 0x02, 0x33, 0xa2, 0x02, 0xd8, 0x12, 0x24, 0x01, 0xa6,
        0xb0, 0x01, 0xaa, 0x07, 0xb6, 0x00, 0xd3, 0xea, 0x00, 0xf4, 0x0e, 0x86, 0x1b, 0xff, 0x61, 0x24,
        0xfc, 0x13, 0x14, 0xec, 0x10, 0xad, 0x66, 0x0b, 0xd8, 0x14, 0xa0, 0x11, 0xc2, 0x8d, 0x0b, 0xd0,
        0x34, 0x51, 0x01, 0x50, 0xb8, 0x01, 0xbe, 0x0e, 0x48, 0x14, 0xb2, 0x01, 0x15, 0xd0, 0x34, 0x61,
        0x14, 0x35, 0x35, 0x16, 0xe3, 0x33, 0x61, 0x16, 0xda, 0xbf, 0x1c, 0xde, 0x24, 0x9e, 0x18, 0x0d,
        0xc1, 0x21, 0xd1, 0x38, 0x09, 0x17, 0x48, 0x24, 0x1e, 0xd0, 0x34, 0x22, 0x17, 0x18, 0x59, 0x1e,
        0xd0, 0x34, 0x2c, 0x17, 0xa6, 0x9c, 0x1e, 0xbe, 0x0e, 0xe9, 0x12, 0xe4, 0x6e, 0x0e, 0xd1, 0x38,
        0x57, 0x14, 0x75, 0xc7, 0x15, 0xe3, 0x33, 0x27, 0x17, 0xe8, 0x8d, 0x1e, 0xbe, 0x0e, 0x2a, 0x14,
        0xc8, 0xfe, 0x12, 0x94, 0x1b, 0xcd, 0x16, 0xdc, 0x46, 0x1d, 0xd0, 0x34, 0xd2, 0x16, 0xac, 0x7b,
        0x1d, 0xd0, 0x34, 0xd7, 0x16, 0x7c, 0xb0, 0x1d, 0xd0, 0x34, 0x75, 0x14, 0x81, 0xae, 0x16, 0xd0,
        0x34, 0x66, 0x14, 0x18, 0x69, 0x16, 0xd0, 0x34, 0x4a, 0x14, 0x42, 0x4e, 0x15, 0xa6, 0x4b, 0x09,
        0x10, 0x15, 0xaf, 0xba, 0x17, 0x8c, 0x0b, 0x06, 0x15, 0x73, 0xb4, 0x17, 0x3c, 0x06, 0x41, 0x02,
        0xa7, 0x96, 0x02, 0x8c, 0x0b, 0x3c, 0x12, 0x10, 0x8b, 0x0c, 0x8c, 0x0b, 0xe4, 0x04, 0xeb, 0x16,
        0x03, 0x3c, 0x06, 0x47, 0x1a, 0x5c, 0xcb, 0x22, 0x8c, 0x0b, 0x8e, 0x1a, 0x3e, 0xe5, 0x23, 0x8f,
        0x0c, 0xa5, 0x1a, 0x4b, 0x19, 0x24, 0x8f, 0x0c, 0xa7, 0x1a, 0xda, 0x25, 0x24, 0xc7, 0x06, 0x0a,
        0x09, 0x03, 0x8f, 0xd4, 0x02, 0x30, 0x14, 0x99, 0x0b, 0x55, 0x41, 0x07, 0x30, 0x14, 0xf0, 0x07,
        0x1a, 0x0a, 0x04, 0x91, 0x08, 0x39, 0x0a, 0x35, 0xd0, 0x05, 0x38, 0x06, 0x34, 0x0a, 0xe5, 0xab,
        0x05, 0x38, 0x06, 0xcd, 0x07, 0x89, 0x01, 0x04, 0x91, 0x08, 0xe3, 0x2d, 0x3c, 0xc2, 0x34, 0x4c,
        0x05, 0xfe, 0x08, 0x18, 0x3e, 0x04, 0x91, 0x08, 0x04, 0x1c, 0x46, 0x3c, 0x25, 0x8e, 0x0b, 0x4a,
        0x1c, 0x6f, 0x82, 0x25, 0x8e, 0x0b, 0x06, 0xb8, 0x1c, 0x74, 0x37, 0x27, 0xa4, 0x24, 0xbf, 0x12,
        0x84, 0x95, 0x0d, 0xa4, 0x24, 0x35, 0x04, 0xbf, 0xe8, 0x02, 0x30, 0x0b, 0xd5, 0x04, 0xbb, 0x0b,
        0x03, 0x30, 0x0b, 0xcb, 0x04, 0x8b, 0x00, 0x03, 0x30, 0x0b, 0x0e, 0x1c, 0xd4, 0x47, 0x25, 0x89,
        0x14, 0x01, 0x32, 0x02, 0xbf, 0x89, 0x02, 0xe8, 0x0c, 0x38, 0xf7, 0x0a, 0x67, 0x49, 0x06, 0x3d,
        0x12, 0xd8, 0x06, 0xf5, 0x88, 0x03, 0xe0, 0x22, 0xce, 0x0b, 0xe8, 0x02, 0x08, 0xd4, 0x11, 0xb6,
        0x12, 0x13, 0x6b, 0x0d, 0x66, 0x1b, 0x7c, 0x17, 0x77, 0x1c, 0x20, 0x92, 0x17, 0x02, 0x0a, 0x3d,
        0xa1, 0x04, 0x58, 0x29, 0xf4, 0x08, 0x5a, 0x35, 0x04, 0xbe, 0x08, 0xa2, 0x2d, 0x5a, 0x1b, 0x34,
        0x60, 0x12, 0xdd, 0x0b, 0xf1, 0x2c, 0x08, 0x29, 0x17, 0x77, 0x12, 0x03, 0xd5, 0x0c, 0xd4, 0x11,
        0xa0, 0x1f, 0x48, 0x76, 0x2e, 0x9f, 0x19, 0x08, 0x20, 0x26, 0xc5, 0x2f, 0x66, 0x1b, 0x2e, 0x1a,
        0xca, 0xb3, 0x22, 0x92, 0x17, 0x5e, 0x10, 0x7a, 0x0e, 0x0b, 0x3d, 0x12, 0x29, 0x0b, 0xee, 0xab,
        0x06, 0x9c, 0x0c, 0x31, 0x16, 0x11, 0x3d, 0x1b, 0xd2, 0x11, 0x89, 0x0a, 0x3f, 0x14, 0x06, 0x9c,
        0x0c, 0xa6, 0x06, 0x61, 0x85, 0x03, 0x94, 0x03, 0x12, 0x11, 0x85, 0x7b, 0x0b, 0x3d, 0x12, 0xc9,
        0x12, 0xb3, 0x17, 0x0e, 0xc1, 0x0c, 0xe2, 0x0b, 0x1a, 0x44, 0x08, 0x29, 0x17, 0x83, 0x1a, 0x00,
        0x84, 0x23, 0x92, 0x17, 0xa1, 0x06, 0x85, 0x6d, 0x03, 0xdc, 0x17, 0x63, 0x1c, 0x4b, 0xb5, 0x25,
        0x09, 0x2c, 0xce, 0x15, 0x3f, 0x40, 0x18, 0x92, 0x17, 0x7c, 0x1c, 0x88, 0xe9, 0x26, 0x92, 0x17,
        0xec, 0x0b, 0x43, 0x5b, 0x08, 0x73, 0x06, 0x5f, 0x07, 0xd5, 0xab, 0x03, 0x9c, 0x0c, 0x07, 0x0a,
        0x95, 0xca, 0x04, 0xdc, 0x17, 0x20, 0x05, 0x97, 0x31, 0x03, 0x9c, 0x0c, 0xa3, 0x09, 0x28, 0x4e,
        0x04, 0x9c, 0x0c, 0x3f, 0x0e, 0x7c, 0xd3, 0x0a, 0x9c, 0x0c, 0x5c, 0x05, 0x33, 0x3e, 0x03, 0x9c,
        0x0c, 0xda, 0x09, 0x94, 0x61, 0x04, 0x9c, 0x0c, 0x03, 0x1d, 0x0d, 0xc9, 0x28, 0x92, 0x17, 0x90,
        0x1c, 0xba, 0x15, 0x27, 0x9c, 0x0c, 0x35, 0x0e, 0xe0, 0xc6, 0x0a, 0x9c, 0x0c, 0xa4, 0x1c, 0xf2,
        0x2e, 0x27, 0x82, 0x08, 0x9a, 0x1c, 0x56, 0x22, 0x27, 0x9c, 0x0c, 0x6f, 0x10, 0xb7, 0x20, 0x0b,
        0x92, 0x17, 0x2a, 0x13, 0x9e, 0x0e, 0x10, 0x60, 0x12, 0xd9, 0x15, 0xce, 0x81, 0x18, 0xc2, 0x03,
        0xc2, 0x0c, 0xb8, 0xbd, 0x09, 0x3d, 0x12, 0x59, 0x1f, 0x18, 0x16, 0x2e, 0xa0, 0x1a, 0x24, 0x1a,
        0x38, 0x9c, 0x22, 0x92, 0x17, 0xc1, 0x04, 0xef, 0xf3, 0x02, 0x9c, 0x0c, 0x1a, 0x1a, 0xa6, 0x84,
        0x22, 0x92, 0x17, 0x6f, 0x12, 0x39, 0x9f, 0x0c, 0x3d, 0x12, 0xce, 0x10, 0x1b, 0x4f, 0x0b, 0x92,
        0x17, 0x3c, 0x16, 0x14, 0xce, 0x1b, 0x92, 0x17, 0x13, 0x0a, 0x33, 0x39, 0x05, 0x2a, 0x0a, 0x1e,
        0x13, 0x06, 0xb9, 0x0f, 0x3d, 0x12, 0x2d, 0x13, 0xfe, 0x20, 0x10, 0xc1, 0x25, 0xb4, 0x13, 0x0a,
        0xdb, 0x11, 0x3d, 0x12, 0x29, 0x18, 0x0a, 0x34, 0x21, 0xd2, 0x21, 0x21, 0x20, 0x2e, 0x52, 0x30,
        0x66, 0x1b, 0x03, 0xae, 0x12, 0x15, 0x51, 0x0d, 0x87, 0x0b, 0x95, 0x12, 0x42, 0x45, 0x0d, 0x87,
        0x0b, 0x6b, 0x00, 0xa9, 0xbc, 0x00, 0x87, 0x0b, 0x02, 0x13, 0x08, 0xab, 0x12, 0x04, 0x89, 0x0a,
        0xee, 0x04, 0x5d, 0x23, 0x03, 0x3a, 0x0e, 0x05, 0xe9, 0x04, 0x27, 0x1d, 0x03, 0x36, 0x06, 0x3d,
        0x15, 0x21, 0xdd, 0x17, 0x8f, 0x08, 0x67, 0x09, 0xa9, 0x46, 0x04, 0x7f, 0x07, 0x1a, 0x15, 0x3b,
        0xc6, 0x17, 0x3c, 0x06, 0x1d, 0x13, 0x3c, 0xad, 0x0f, 0xca, 0x0b, 0x01, 0x91, 0x07, 0x71, 0xb8,
        0x03, 0xfc, 0x12, 0x04, 0x2f, 0x0a, 0xca, 0x8a, 0x05, 0x26, 0x18, 0x54, 0x08, 0x34, 0x1d, 0x04,
        0x26, 0x18, 0x3e, 0x0a, 0x65, 0xe1, 0x05, 0x26, 0x18, 0x47, 0x1e, 0x80, 0x42, 0x2a, 0x26, 0x18,
        0x0d, 0x42, 0x2e, 0x15, 0x8d, 0x35, 0xd4, 0x11, 0x3e, 0x16, 0xa6, 0xe5, 0x1b, 0xd4, 0x11, 0x6b,
        0x13, 0x55, 0x26, 0x11, 0xd4, 0x11, 0x86, 0x17, 0x09, 0x34, 0x20, 0xd4, 0x11, 0x80, 0x0c, 0xf4,
        0x4a, 0x09, 0xd4, 0x11, 0x04, 0x14, 0x89, 0x46, 0x12, 0xd4, 0x11, 0xc0, 0x2d, 0x0b, 0x7d, 0x34,
        0x60, 0x12, 0x1a, 0x06, 0xd7, 0x5f, 0x03, 0x9c, 0x0c, 0x0c, 0x0a, 0x71, 0xe2, 0x04, 0x9c, 0x0c,
        0x16, 0x20, 0x8c, 0xe0, 0x2f, 0xd4, 0x11, 0x1d, 0x20, 0xf3, 0x12, 0x30, 0x3b, 0x3f, 0xcd, 0x1d,
        0x54, 0x4f, 0x29, 0xd4, 0x11, 0x1a, 0x20, 0xa9, 0xf2, 0x2f, 0xfa, 0x1f, 0x23, 0xff, 0x0c, 0x21,
        0x4e, 0x0a, 0x0e, 0x0d, 0x51, 0x29, 0x89, 0x6c, 0x32, 0x96, 0x13, 0x97, 0x10, 0x49, 0x38, 0x0b,
        0x46, 0x0b, 0x13, 0x12, 0x7a, 0xca, 0x0b, 0xe8, 0x0c, 0x49, 0x0e, 0x4b, 0xe6, 0x0a, 0xf2, 0x0d,
        0x55, 0x16, 0x62, 0x8e, 0x1c, 0xe8, 0x0c, 0xe8, 0x1d, 0xbc, 0x03, 0x2a, 0x0e, 0x0d, 0xeb, 0x1d,
        0x6d, 0x11, 0x2a, 0x17, 0x0c, 0x8c, 0x0c, 0xc0, 0x67, 0x09, 0x27, 0x03, 0xe4, 0x1c, 0x2a, 0x28,
        0x28, 0x66, 0x12, 0xd8, 0x0b, 0xca, 0x29, 0x08, 0x27, 0x03, 0xc1, 0x09, 0xc4, 0x5a, 0x04, 0xd0,
        0x06, 0x70, 0x12, 0x76, 0xb1, 0x0c, 0x96, 0x13, 0xea, 0x0d, 0xb9, 0xc3, 0x0a, 0x27, 0x03, 0x62,
        0x0e, 0x3d, 0xf4, 0x0a, 0x99, 0x03, 0x32, 0x16, 0xe3, 0x4e, 0x1b, 0xe8, 0x0c, 0x44, 0x0e, 0xb2,
        0xe2, 0x0a, 0x99, 0x03, 0x67, 0x0e, 0xd6, 0xf7, 0x0a, 0x99, 0x03, 0xf1, 0x15, 0x79, 0xd9, 0x18,
        0xe8, 0x0c, 0xec, 0x15, 0x91, 0xcc, 0x18, 0xe8, 0x0c, 0x0a, 0x16, 0xf7, 0x33, 0x19, 0xe8, 0x0c,
        0x0f, 0x16, 0xdf, 0x40, 0x19, 0xf2, 0x0d, 0x28, 0x16, 0xb9, 0x5b, 0x19, 0xe8, 0x0c, 0x05, 0x16,
        0x0f, 0x27, 0x19, 0xe8, 0x0c, 0xf6, 0x15, 0x61, 0xe6, 0x18, 0xe8, 0x0c, 0xe7, 0x15, 0x5c, 0xaf,
        0x18, 0xe8, 0x0c, 0x14, 0x16, 0xd1, 0x4e, 0x19, 0xe8, 0x0c, 0xf2, 0x14, 0x91, 0x60, 0x17, 0xe8,
        0x0c, 0x22, 0x13, 0xce, 0xe5, 0x0f, 0x3c, 0x0a, 0x37, 0x16, 0x2c, 0xc1, 0x1b, 0xe8, 0x0c, 0xfb,
        0x09, 0x30, 0x6e, 0x04, 0x18, 0x12, 0xba, 0x13, 0xfb, 0x18, 0x12, 0x3c, 0x0a, 0xc3, 0x13, 0x37,
        0x23, 0x12, 0x12, 0x15, 0x4f, 0x14, 0x3e, 0xb4, 0x15, 0x37, 0x13, 0x53, 0x20, 0x36, 0x6e, 0x30,
        0xf6, 0x04, 0x06, 0x1b, 0x0a, 0x86, 0x5d, 0x05, 0x44, 0x2d, 0x26, 0x12, 0xb7, 0xd7, 0x0b, 0xa6,
        0x39, 0xee, 0x1c, 0xe9, 0x67, 0x28, 0xa6, 0x39, 0x6e, 0x1e, 0x8f, 0x3d, 0x2b, 0xa6, 0x39, 0x6f,
        0x1e, 0x35, 0x77, 0x2b, 0xa6, 0x39, 0x71, 0x1e, 0xdb, 0xb0, 0x2b, 0xf4, 0x47, 0x02, 0xbb, 0x12,
        0x79, 0x86, 0x0d, 0x0b, 0x0f, 0x48, 0x0a, 0x8b, 0xf9, 0x05, 0xee, 0x06, 0x07, 0x6f, 0x0b, 0x64,
        0xd7, 0x06, 0xe7, 0x11, 0x6d, 0x0d, 0x6f, 0x9e, 0x0a, 0x89, 0x0d, 0x3d, 0x0b, 0x7c, 0xc9, 0x06,
        0xe8, 0x0d, 0x01, 0x0b, 0xa4, 0x5b, 0x06, 0x44, 0x12, 0x7e, 0x0b, 0x32, 0xfb, 0x06, 0xe7, 0x11,
        0x06, 0x0b, 0xe8, 0x6d, 0x06, 0x44, 0x12, 0x79, 0x0b, 0x4b, 0xe9, 0x06, 0xe7, 0x11, 0x03, 0x1a,
        0x0b, 0x2c, 0x80, 0x06, 0xf2, 0x10, 0x24, 0x0b, 0xfc, 0x9a, 0x06, 0xf2, 0x10, 0x2e, 0x0b, 0x8a,
        0xb8, 0x06, 0xf2, 0x10, 0x06, 0xba, 0x0b, 0xfa, 0xc0, 0x07, 0x3c, 0x16, 0xb0, 0x0b, 0x76, 0x8c,
        0x07, 0x3c, 0x16, 0xc4, 0x0b, 0x0f, 0xed, 0x07, 0xd9, 0x15, 0xf7, 0x2d, 0x88, 0xc7, 0x34, 0x3d,
        0x12, 0xbf, 0x0b, 0x36, 0xd7, 0x07, 0xd9, 0x15, 0xaa, 0x15, 0x9e, 0x31, 0x18, 0xa1, 0x0e, 0x0e,
        0x6d, 0x17, 0xc9, 0xab, 0x1f, 0xee, 0x62, 0x9b, 0x13, 0x9e, 0x50, 0x11, 0xee, 0x62, 0xfb, 0x0b,
        0xb6, 0x61, 0x08, 0xb2, 0x70, 0x59, 0x17, 0xef, 0x1c, 0x1f, 0xc0, 0x0d, 0x63, 0x17, 0x09, 0x9e,
        0x1f, 0xc0, 0x0d, 0x45, 0x14, 0x62, 0xd7, 0x13, 0xf4, 0x84, 0x5f, 0x0c, 0x68, 0xd2, 0x08, 0xba,
        0x68, 0x7b, 0x1e, 0xc5, 0x8b, 0x2c, 0x0c, 0x83, 0x15, 0x29, 0xb9, 0xc1, 0x31, 0x34, 0x94, 0x6d,
        0x1e, 0x83, 0xba, 0x2a, 0x0c, 0x83, 0x77, 0x17, 0xb7, 0x0e, 0x20, 0xc0, 0x0d, 0x5e, 0x17, 0xaf,
        0x2a, 0x1f, 0x5a, 0x73, 0x44, 0x14, 0x08, 0x64, 0x13, 0x5a, 0x73, 0x46, 0x14, 0x56, 0x5c, 0x14,
        0x5c, 0xa5, 0x01, 0x64, 0x0c, 0x22, 0x3b, 0x09, 0x94, 0x05, 0x01, 0x73, 0x0c, 0xb6, 0x40, 0x09,
        0x3e, 0x0a, 0x02, 0x9b, 0x0c, 0x59, 0x75, 0x09, 0xa6, 0x04, 0x28, 0x14, 0xf2, 0xf1, 0x12, 0x50,
        0x05, 0x01, 0xa5, 0x0c, 0xfe, 0xb6, 0x09, 0xba, 0x06, 0x03, 0xb5, 0x0b, 0xb2, 0xa2, 0x07, 0x48,
        0x1e, 0xde, 0x1f, 0xde, 0xe8, 0x2e, 0xde, 0x15, 0xe8, 0x1f, 0xc2, 0x23, 0x2f, 0x30, 0x15, 0x02,
        0x9a, 0x0d, 0xf8, 0xab, 0x0a, 0x0b, 0x0a, 0xcc, 0x0d, 0x03, 0xb6, 0x0a, 0xb6, 0x0d, 0x13, 0x08,
        0x2c, 0xe4, 0x91, 0x33, 0x18, 0x1e, 0xa1, 0x2e, 0xe9, 0x9e, 0x35, 0xb8, 0x3e, 0xf1, 0x29, 0x58,
        0xbc, 0x32, 0x18, 0x1e, 0x32, 0x1e, 0xe8, 0x28, 0x2a, 0x98, 0x19, 0x3d, 0x2e, 0xfd, 0x6e, 0x35,
        0x18, 0x1e, 0x38, 0x0a, 0x1d, 0xb2, 0x05, 0x18, 0x1e, 0x3a, 0x0a, 0x6d, 0xd6, 0x05, 0xf8, 0x0a,
        0x32, 0x12, 0xed, 0x24, 0x0c, 0x98, 0x19, 0x93, 0x2d, 0xbb, 0xc7, 0x33, 0x98, 0x19, 0xfa, 0x0c,
        0xc9, 0x1b, 0x0a, 0x58, 0x32, 0x9b, 0x1d, 0x0b, 0xe1, 0x28, 0xf8, 0x0a, 0x3a, 0x1f, 0x2e, 0xe7,
        0x2d, 0x98, 0x19, 0x83, 0x0c, 0xc8, 0x5c, 0x09, 0xf8, 0x0a, 0x05, 0x13, 0x22, 0x23, 0x0f, 0xf8,
        0x0a, 0xfc, 0x09, 0x48, 0x80, 0x04, 0x7e, 0x12, 0xfa, 0x1b, 0xc5, 0x23, 0x25, 0x81, 0x18, 0xf5,
        0x1b, 0x92, 0x02, 0x25, 0x33, 0x21, 0x1e, 0x1e, 0x84, 0x1d, 0x2a, 0xf8, 0x0a, 0x88, 0x20, 0x0f,
        0xb1, 0x30, 0xc3, 0x3c, 0x06, 0xf4, 0x12, 0x92, 0xcd, 0x0e, 0x12, 0x2e, 0xcb, 0x0c, 0xb7, 0xed,
        0x09, 0x12, 0x2e, 0x9d, 0x0a, 0xb2, 0x23, 0x06, 0xb5, 0x25, 0x4a, 0x0d, 0x61, 0x6d, 0x0a, 0x3a,
        0x0a, 0x40, 0x0d, 0x2f, 0x5b, 0x0a, 0x32, 0x12, 0xb8, 0x1a, 0xa1, 0x2c, 0x24, 0x1a, 0x02, 0x04,
        0xe9, 0x2f, 0x4b, 0x2d, 0x36, 0x14, 0x12, 0x54, 0x0d, 0x9b, 0x77, 0x0a, 0xc6, 0x11, 0x38, 0x13,
        0xaf, 0xc7, 0x10, 0xb2, 0x04, 0x24, 0x13, 0x0a, 0xf0, 0x0f, 0x7f, 0x0e, 0x02, 0xfe, 0x1c, 0x8f,
        0xa1, 0x28, 0x7e, 0x27, 0xde, 0x05, 0xcf, 0x4a, 0x03, 0x08, 0x15, 0x08, 0x5b, 0x10, 0x85, 0x05,
        0x0b, 0xf5, 0x08, 0x31, 0x0a, 0xf0, 0xa2, 0x05, 0xf5, 0x08, 0x8f, 0x0e, 0x6f, 0xfb, 0x0a, 0x16,
        0x0a, 0x92, 0x06, 0x73, 0x6c, 0x03, 0x12, 0x01, 0x60, 0x1a, 0x3c, 0x23, 0x23, 0x8c, 0x0b, 0xaa,
        0x16, 0x68, 0x22, 0x1d, 0x8c, 0x0b, 0x65, 0x1a, 0xc8, 0x2e, 0x23, 0x8c, 0x0b, 0xdd, 0x15, 0x90,
        0x85, 0x18, 0x8c, 0x0b, 0x02, 0x15, 0x2e, 0xec, 0xed, 0x34, 0x94, 0x08, 0x11, 0x14, 0xb3, 0xd5,
        0x12, 0xe2, 0x0c, 0x0a, 0xd9, 0x2d, 0x69, 0xb9, 0x34, 0xd3, 0x08, 0x3b, 0x12, 0xda, 0x7a, 0x0c,
        0x36, 0x10, 0xc9, 0x10, 0x8f, 0x43, 0x0b, 0x8c, 0x0b, 0x5f, 0x16, 0xea, 0xaf, 0x1c, 0xf0, 0x0f,
        0x9f, 0x17, 0x77, 0x93, 0x20, 0x32, 0x10, 0x46, 0x16, 0xea, 0x53, 0x1c, 0x32, 0x10, 0xae, 0x17,
        0x02, 0xd6, 0x20, 0x32, 0x10, 0xa9, 0x17, 0x76, 0xca, 0x20, 0x8c, 0x0b, 0xf7, 0x19, 0x1b, 0x69,
        0x22, 0x32, 0x10, 0xfc, 0x19, 0x4d, 0x79, 0x22, 0x59, 0x0b, 0x05, 0x1e, 0x25, 0xeb, 0x6d, 0x31,
        0x83, 0x21, 0x07, 0x14, 0x39, 0xa7, 0x12, 0xe4, 0x10, 0x67, 0x13, 0xbf, 0x08, 0x11, 0x96, 0x1d,
        0x0c, 0x14, 0x1d, 0xb8, 0x12, 0x96, 0x1d, 0xfc, 0x14, 0x8f, 0xa3, 0x17, 0xe4, 0x10, 0x03, 0x7e,
        0x15, 0x6f, 0x06, 0x18, 0x92, 0x0b, 0x93, 0x0a, 0xdb, 0x20, 0x06, 0xd7, 0x02, 0xb6, 0x2d, 0x19,
        0x59, 0x34, 0x4f, 0x08, 0x06, 0xe0, 0x2b, 0x6c, 0x57, 0x33, 0x66, 0x28, 0x83, 0x0b, 0x19, 0x0d,
        0x07, 0x1e, 0x1a, 0x88, 0x0b, 0x37, 0x27, 0x07, 0x1e, 0x1a, 0xf6, 0x14, 0x79, 0x6d, 0x17, 0x16,
        0x36, 0x79, 0x1e, 0xca, 0x68, 0x2c, 0xfb, 0x22, 0xee, 0x16, 0x4c, 0xe5, 0x1d, 0x66, 0x28, 0x08,
        0xa0, 0x0c, 0xff, 0x79, 0x09, 0xf9, 0x2a, 0x63, 0x0d, 0x61, 0x89, 0x0a, 0x0e, 0x15, 0xd3, 0x0b,
        0xbc, 0x14, 0x08, 0x0e, 0x15, 0xb8, 0x1f, 0x95, 0xbd, 0x2e, 0xf9, 0x2a, 0x29, 0x16, 0xa1, 0x68,
        0x19, 0x7a, 0x45, 0xab, 0x0b, 0x68, 0x77, 0x07, 0x0e, 0x15, 0xc8, 0x12, 0x4a, 0xf3, 0x0d, 0x69,
        0x24, 0xd3, 0x1d, 0x2e, 0x8f, 0x29, 0x7a, 0x45, 0x04, 0xb3, 0x12, 0x9c, 0x5c, 0x0d, 0x77, 0x0e,
        0x27, 0x12, 0x5d, 0x11, 0x0c, 0x90, 0x13, 0xe4, 0x2f, 0x01, 0x0b, 0x36, 0x4a, 0x22, 0x72, 0x12,
        0x4a, 0xc5, 0x0c, 0x77, 0x0e, 0x0c, 0xef, 0x12, 0xb5, 0xa7, 0x0e, 0x2b, 0x1b, 0xc2, 0x12, 0x28,
        0xba, 0x0d, 0x2b, 0x1b, 0x39, 0x14, 0x32, 0x3f, 0x13, 0xd6, 0x24, 0xc7, 0x1c, 0xf5, 0x9e, 0x27,
        0xd6, 0x24, 0x8d, 0x1a, 0x68, 0xc0, 0x23, 0xd6, 0x24, 0x2f, 0x14, 0x5c, 0x1a, 0x13, 0xd6, 0x24,
        0x51, 0x1a, 0xe8, 0xd6, 0x22, 0xd6, 0x24, 0x79, 0x1a, 0x54, 0x3a, 0x23, 0xd6, 0x24, 0x7e, 0x1a,
        0x2a, 0x5f, 0x23, 0xd6, 0x24, 0xcc, 0x1c, 0x14, 0xf5, 0x27, 0xd6, 0x24, 0x88, 0x1a, 0x92, 0x9b,
        0x23, 0xd6, 0x24, 0x31, 0x13, 0xbf, 0x46, 0x10, 0x11, 0x2b, 0x02, 0xe5, 0x12, 0x74, 0x24, 0x0e,
        0x91, 0x21, 0x38, 0x12, 0x85, 0x3e, 0x0c, 0x91, 0x21, 0x04, 0xfe, 0x12, 0xa4, 0xfb, 0x0e, 0x7e,
        0x27, 0x5b, 0x1a, 0xbe, 0xfb, 0x22, 0x7e, 0x27, 0x91, 0x16, 0xea, 0xfa, 0x1c, 0x7e, 0x27, 0x92,
        0x1a, 0xcd, 0xf1, 0x23, 0x7e, 0x27, 0x02, 0x5d, 0x13, 0x61, 0xcc, 0x10, 0x5e, 0x3c, 0x32, 0x13,
        0xd0, 0x71, 0x10, 0x5e, 0x3c, 0x07, 0x9d, 0x14, 0x35, 0x20, 0x17, 0x75, 0x23, 0x4d, 0x14, 0xe8,
        0x99, 0x15, 0x56, 0x1a, 0x3c, 0x1f, 0xc6, 0x00, 0x2e, 0x6b, 0x14, 0xd3, 0x29, 0x1f, 0x80, 0x32,
        0x56, 0x1a, 0xdf, 0x1e, 0x54, 0x51, 0x2d, 0x5d, 0x1b, 0xc3, 0x16, 0xf4, 0x2d, 0x1d, 0xe8, 0x18,
        0xd4, 0x1d, 0xa8, 0xd4, 0x29, 0x5d, 0x1b, 0x0a, 0x6b, 0x14, 0xe8, 0x9d, 0x16, 0x99, 0x10, 0x84,
        0x14, 0x03, 0xff, 0x16, 0x99, 0x10, 0x89, 0x14, 0x9c, 0x0f, 0x17, 0x99, 0x10, 0x17, 0x18, 0x17,
        0x15, 0x21, 0xf3, 0x1e, 0x1f, 0x13, 0x43, 0xcb, 0x0f, 0x8b, 0x1a, 0x64, 0x1c, 0x54, 0xe1, 0x25,
        0x41, 0x0e, 0xb3, 0x17, 0x34, 0xe6, 0x20, 0xf3, 0x1e, 0x30, 0x18, 0xdc, 0x55, 0x21, 0xf3, 0x1e,
        0x5d, 0x14, 0x58, 0xfb, 0x15, 0x58, 0x2c, 0x39, 0x18, 0xcf, 0x74, 0x21, 0xfc, 0x0b, 0x03, 0xe7,
        0x29, 0x75, 0x9a, 0x32, 0xe3, 0x21, 0x9a, 0x0b, 0x85, 0x55, 0x07, 0xe3, 0x21, 0x16, 0x0a, 0x5d,
        0x43, 0x05, 0x29, 0x1a, 0x03, 0x31, 0x17, 0x64, 0xab, 0x1e, 0xa0, 0x1f, 0x07, 0x13, 0x1a, 0x2e,
        0x0f, 0xa0, 0x1f, 0x45, 0x17, 0x04, 0xcb, 0x1e, 0xa0, 0x1f, 0x04, 0x06, 0x29, 0x6e, 0x8f, 0x31,
        0x4b, 0x32, 0xe1, 0x1f, 0xbc, 0xfe, 0x2e, 0x06, 0x25, 0x4a, 0x17, 0xa4, 0xea, 0x1e, 0x4b, 0x32,
        0xfb, 0x1e, 0x19, 0x86, 0x2d, 0x06, 0x25, 0x04, 0x95, 0x17, 0xdd, 0x45, 0x20, 0xcd, 0x26, 0x9a,
        0x17, 0xaa, 0x6c, 0x20, 0xcd, 0x26, 0xa4, 0x17, 0xa9, 0xa3, 0x20, 0xcd, 0x26, 0x9c, 0x13, 0x8c,
        0xb3, 0x11, 0x7e, 0x27, 0x0b, 0x8f, 0x1f, 0xfc, 0x6d, 0x2e, 0x1a, 0x06, 0xe2, 0x15, 0x1c, 0x91,
        0x18, 0x40, 0x1e, 0x36, 0x13, 0x2e, 0xae, 0x10, 0x81, 0x19, 0xe6, 0x1b, 0xd2, 0xb0, 0x24, 0x40,
        0x1e, 0xeb, 0x1b, 0x12, 0xcf, 0x24, 0x80, 0x33, 0x00, 0x16, 0x8f, 0xf3, 0x18, 0x80, 0x33, 0xa0,
        0x15, 0xab, 0x22, 0x18, 0xf3, 0x0e, 0xc8, 0x14, 0x48, 0x5a, 0x17, 0x49, 0x06, 0x6e, 0x16, 0xb8,
        0xe4, 0x1c, 0x32, 0x16, 0xc4, 0x14, 0xff, 0x53, 0x17, 0x49, 0x06, 0xef, 0x16, 0xb2, 0x0d, 0x1e,
        0x49, 0x06, 0x03, 0x66, 0x19, 0x9e, 0x24, 0x22, 0x15, 0x2b, 0x99, 0x18, 0xcb, 0x80, 0x21, 0x42,
        0x40, 0x77, 0x1e, 0x8f, 0x54, 0x2c, 0x3b, 0x14, 0x08, 0xde, 0x19, 0xb3, 0x4f, 0x22, 0x68, 0x19,
        0xc3, 0x1b, 0xfb, 0x75, 0x24, 0xd7, 0x3a, 0x27, 0x2b, 0x0f, 0xf1, 0x32, 0x57, 0x19, 0x29, 0x13,
        0x89, 0xfe, 0x0f, 0x15, 0x10, 0xac, 0x2d, 0xba, 0x2d, 0x34, 0x5f, 0x2b, 0xd4, 0x15, 0xd1, 0x57,
        0x18, 0xfd, 0x29, 0x7b, 0x15, 0x5a, 0xf6, 0x17, 0x15, 0x10, 0xfa, 0x1e, 0xb1, 0x6c, 0x2d, 0x68,
        0x19, 0x01, 0x22, 0x1c, 0x5d, 0x5c, 0x25, 0x6f, 0x08, 0x01, 0x3b, 0x1c, 0x85, 0x6d, 0x25, 0xea,
        0x14, 0x02, 0x80, 0x12, 0xb9, 0xe8, 0x0c, 0xf1, 0x0a, 0xf2, 0x12, 0xe0, 0xc2, 0x0e, 0xb2, 0x0a,
        0x01, 0x27, 0x1c, 0xcc, 0x64, 0x25, 0xb9, 0x08, 0x02, 0x8d, 0x24, 0x39, 0xfc, 0x30, 0x8c, 0x27,
        0x63, 0x1f, 0xb8, 0x30, 0x2e, 0x8c, 0x27, 0x09, 0xa1, 0x24, 0xc5, 0x23, 0x31, 0x26, 0x4a, 0x2b,
        0x16, 0x1b, 0xae, 0x19, 0x26, 0x4a, 0x0d, 0x0a, 0x0d, 0xef, 0x04, 0x26, 0x4a, 0x30, 0x16, 0xeb,
        0xf2, 0x1a, 0x26, 0x4a, 0x38, 0x2e, 0xd7, 0x24, 0x35, 0x26, 0x4a, 0xec, 0x1c, 0x90, 0x3a, 0x28,
        0x59, 0x2d, 0xae, 0x1f, 0x3c, 0x90, 0x2e, 0x59, 0x2d, 0x1a, 0x2e, 0x80, 0xf6, 0x34, 0x57, 0x2e,
        0x03, 0x20, 0xe0, 0xa2, 0x2f, 0x46, 0x22, 0x01, 0xf4, 0x1f, 0xbe, 0x39, 0x2f, 0xa0, 0x4b, 0x03,
        0x47, 0x29, 0xed, 0x55, 0x32, 0x9c, 0x16, 0xd6, 0x1d, 0x05, 0xf0, 0x29, 0x47, 0x13, 0xb5, 0x13,
        0x47, 0xed, 0x11, 0xb4, 0x2b, 0x01, 0xfa, 0x2a, 0x70, 0xda, 0x32, 0x9f, 0x16, 0x01, 0x54, 0x2b,
        0x66, 0x0a, 0x33, 0x15, 0x0d, 0x01, 0xef, 0x2b, 0xd2, 0x7f, 0x33, 0x12, 0x12, 0x14, 0xfc, 0x2d,
        0xc5, 0xd9, 0x34, 0x27, 0x14, 0x67, 0x1c, 0x29, 0xfd, 0x25, 0x22, 0x07, 0x7b, 0x1c, 0xf7, 0xcf,
        0x26, 0x91, 0x19, 0x42, 0x16, 0x56, 0x46, 0x1c, 0x94, 0x0d, 0x66, 0x1c, 0x95, 0xef, 0x25, 0x94,
        0x0d, 0x76, 0x1c, 0xa7, 0x99, 0x26, 0x94, 0x0d, 0x71, 0x1c, 0x57, 0x63, 0x26, 0x94, 0x0d, 0x6c,
        0x1c, 0x07, 0x2d, 0x26, 0x94, 0x0d, 0x69, 0x1c, 0x4b, 0x04, 0x26, 0x94, 0x0d, 0x6b, 0x1c, 0x73,
        0x1f, 0x26, 0x94, 0x0d, 0x73, 0x1c, 0xeb, 0x70, 0x26, 0x94, 0x0d, 0x6a, 0x1c, 0xdf, 0x11, 0x26,
        0x94, 0x0d, 0x70, 0x1c, 0xc3, 0x55, 0x26, 0x94, 0x0d, 0x7a, 0x1c, 0x63, 0xc2, 0x26, 0x94, 0x0d,
        0x78, 0x1c, 0x3b, 0xa7, 0x26, 0x94, 0x0d, 0x79, 0x1c, 0xcf, 0xb4, 0x26, 0x94, 0x0d, 0x6f, 0x1c,
        0x2f, 0x48, 0x26, 0x94, 0x0d, 0x74, 0x1c, 0x7f, 0x7e, 0x26, 0x94, 0x0d, 0x75, 0x1c, 0x13, 0x8c,
        0x26, 0x94, 0x0d, 0x6e, 0x1c, 0x9b, 0x3a, 0x26, 0x94, 0x0d, 0x09, 0xc5, 0x2d, 0x6b, 0x8f, 0x34,
        0xfe, 0x29, 0xda, 0x2f, 0x9b, 0xde, 0x35, 0xde, 0x15, 0x66, 0x1f, 0x44, 0x58, 0x2e, 0x18, 0x15,
        0x98, 0x2d, 0x53, 0xe1, 0x33, 0x5d, 0x2a, 0xe6, 0x12, 0x05, 0x46, 0x0e, 0xdf, 0x28, 0xac, 0x1d,
        0x03, 0xec, 0x28, 0xfe, 0x29, 0x14, 0x1f, 0xbc, 0xd0, 0x2d, 0xde, 0x15, 0xce, 0x1d, 0x28, 0x61,
        0x29, 0xee, 0x18, 0xd2, 0x1d, 0x16, 0x7a, 0x29, 0x18, 0x15, 0x02, 0xbb, 0x2d, 0x68, 0x61, 0x34,
        0xa3, 0x1b, 0x5e, 0x14, 0xb0, 0x27, 0x16, 0xf0, 0x04, 0x01, 0x9d, 0x2d, 0xb0, 0x0b, 0x34, 0xaa,
        0x0f, 0x03, 0x76, 0x20, 0xad, 0x75, 0x30, 0x53, 0x39, 0x92, 0x12, 0xef, 0x0b, 0x0d, 0x53, 0x39,
        0xc7, 0x1d, 0x01, 0x16, 0x29, 0x53, 0x39, 0x01, 0x90, 0x0c, 0xe7, 0x6a, 0x09, 0x72, 0x0a, 0x07,
        0xa4, 0x0c, 0xf8, 0xa4, 0x09, 0x06, 0x12, 0x24, 0x15, 0x77, 0xcc, 0x17, 0xaa, 0x10, 0xc4, 0x0c,
        0xf5, 0xcf, 0x09, 0xc2, 0x1d, 0x8d, 0x15, 0x01, 0x12, 0x18, 0xaa, 0x10, 0xb7, 0x07, 0x6d, 0xcb,
        0x03, 0xc7, 0x25, 0x65, 0x15, 0xb0, 0xe5, 0x17, 0xaa, 0x10, 0xfd, 0x1e, 0x1f, 0xab, 0x2d, 0x7d,
        0x23, 0x02, 0x40, 0x0e, 0x18, 0xe0, 0x0a, 0x9a, 0x02, 0x92, 0x13, 0x29, 0x38, 0x11, 0x75, 0x18,
        0x02, 0x01, 0x0a, 0xc6, 0x92, 0x04, 0x77, 0x0e, 0x4d, 0x0a, 0x79, 0x00, 0x06, 0x71, 0x13, 0x03,
        0x3a, 0x12, 0x16, 0x60, 0x0c, 0xc4, 0x1a, 0x74, 0x1e, 0xd0, 0x1f, 0x2c, 0x32, 0x16, 0x02, 0x20,
        0x1c, 0x88, 0x2f, 0xc4, 0x1a, 0x01, 0xc3, 0x12, 0x53, 0xd5, 0x0d, 0xf7, 0x1d, 0x02, 0x09, 0x13,
        0xba, 0x4d, 0x0f, 0xa6, 0x10, 0x5f, 0x14, 0xa0, 0x2c, 0x16, 0x95, 0x08, 0x02, 0xdf, 0x2f, 0x79,
        0xf4, 0x35, 0x88, 0x16, 0x76, 0x1e, 0x02, 0x36, 0x2c, 0x8d, 0x1e, 0x01, 0x89, 0x12, 0x5a, 0xf5,
        0x0c, 0x79, 0x15, 0x03, 0xc2, 0x17, 0x27, 0x05, 0x21, 0xf0, 0x0f, 0xcf, 0x1e, 0x74, 0x31, 0x2d,
        0xf0, 0x0f, 0xd4, 0x1e, 0x64, 0x41, 0x2d, 0xf0, 0x0f, 0x02, 0x14, 0x14, 0x95, 0xe2, 0x12, 0x00,
        0x04, 0x29, 0x14, 0x42, 0xf7, 0x12, 0x86, 0x07, 0x02, 0x49, 0x14, 0x82, 0x36, 0x15, 0xc0, 0x17,
        0x85, 0x1b, 0x3f, 0x4a, 0x24, 0xc0, 0x17, 0x01, 0x79, 0x14, 0x51, 0xe3, 0x16, 0x55, 0x10, 0x02,
        0xb8, 0x07, 0x34, 0xf1, 0x03, 0x55, 0x10, 0xad, 0x14, 0xaa, 0x43, 0x17, 0x55, 0x10, 0x01, 0x52,
        0x16, 0x1c, 0x64, 0x1c, 0x46, 0x2a, 0x01, 0x2e, 0x16, 0x1d, 0x47, 0x1a, 0xf2, 0x5c, 0x01, 0x35,
        0x16, 0xf1, 0x9a, 0x1b, 0x3b, 0x26, 0x02, 0x5b, 0x16, 0x4a, 0x9b, 0x1c, 0xa0, 0x14, 0x81, 0x1c,
        0x1a, 0x01, 0x27, 0xa0, 0x14, 0x01, 0x7f, 0x1b, 0xbb, 0x2e, 0x24, 0x84, 0x1b, 0x02, 0x73, 0x1e,
        0xcf, 0xf8, 0x2b, 0x01, 0x27, 0x61, 0x1c, 0x4a, 0x8e, 0x25, 0x01, 0x27, 0x01, 0xc4, 0x1c, 0x18,
        0x5c, 0x27, 0xdd, 0x42, 0x01, 0x4a, 0x1e, 0xa6, 0x5a, 0x2a, 0x96, 0x5f, 0x01, 0x1f, 0x0b, 0x1e,
        0x91, 0x06, 0xde, 0x09, 0x89, 0x0a, 0x62, 0x00, 0x02, 0x00, 0x21, 0x82, 0x1f, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x68, 0x85, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
        0x02, 0x00, 0x6b, 0x86, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x02, 0x00, 0x7f, 0x80,
        0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x02, 0x00, 0x7f, 0x80, 0x03, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x43, 0x00, 0x02, 0x00, 0x7f, 0x80, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4b, 0x00,
        0x02, 0x00, 0x7f, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x53, 0x00, 0x02, 0x00, 0xa3, 0x06,
        0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x00, 0x02, 0x00, 0xa7, 0x58, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x63, 0x00, 0x02, 0x00, 0xb4, 0x4b, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6b, 0x00,
        0x02, 0x00, 0xbb, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x00, 0x02, 0x00, 0xbb, 0xaa,
        0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7b, 0x00, 0x02, 0x00, 0xc5, 0x60, 0x07, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x83, 0x00, 0x02, 0x00, 0xcf, 0x30, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8b, 0x00,
        0x02, 0x00, 0xcf, 0x30, 0x97, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9a, 0x00, 0x02, 0x00, 0xde, 0x80,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb7, 0x00, 0x02, 0x00, 0xdf, 0x20, 0x0c, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xcd, 0x00, 0x02, 0x00, 0xdf, 0x20, 0x17, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd5, 0x00,
        0x02, 0x00, 0xef, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdd, 0x00, 0x02, 0x00, 0xef, 0x10,
        0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe5, 0x00, 0x02, 0x00, 0xf0, 0xba, 0x03, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xed, 0x00, 0x02, 0x00, 0xf3, 0x00, 0x91, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00,
        0x02, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfd, 0x00, 0x02, 0x00, 0xfc, 0x00,
        0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x01, 0x02, 0x00, 0xfc, 0x00, 0x84, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x1b, 0x01, 0x02, 0x00, 0xfc, 0x00, 0x85, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x01,
        0x02, 0x00, 0xfe, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32, 0x01, 0x02, 0x00, 0xfe, 0x01,
        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x01, 0x02, 0x00, 0xfe, 0x01, 0x03, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x42, 0x01, 0x02, 0x00, 0xfe, 0x01, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6d, 0x01,
        0x02, 0x00, 0xfe, 0x01, 0x0b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x01, 0x02, 0x00, 0xfe, 0x01,
        0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x84, 0x01, 0x02, 0x00, 0xfe, 0x01, 0x20, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x8c, 0x01, 0x02, 0x00, 0xfe, 0x01, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x94, 0x01,
        0x02, 0x00, 0xfe, 0x01, 0x9e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9c, 0x01, 0x02, 0x00, 0xfe, 0x84,
        0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa4, 0x01, 0x02, 0x00, 0xfe, 0x84, 0x21, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xac, 0x01, 0x02, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb4, 0x01,
        0x02, 0x00, 0xff, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xca, 0x01, 0x02, 0x00, 0xff, 0x00,
        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd9, 0x01, 0x02, 0x00, 0xff, 0x00, 0x05, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xfd, 0x01, 0x02, 0x00, 0xff, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x02,
        0x02, 0x00, 0xff, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22, 0x02, 0x02, 0x00, 0xff, 0x00,
        0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2a, 0x02, 0x02, 0x00, 0xff, 0x00, 0x0d, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x32, 0x02, 0x02, 0x00, 0xff, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3a, 0x02,
        0x02, 0x00, 0xff, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0x02, 0x02, 0x00, 0xff, 0x00,
        0x15, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4a, 0x02, 0x02, 0x00, 0xff, 0x00, 0x18, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x52, 0x02, 0x02, 0x00, 0xff, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5a, 0x02,
        0x02, 0x00, 0xff, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x02, 0x02, 0x00, 0xff, 0x00,
        0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6a, 0x02, 0x02, 0x00, 0xff, 0x00, 0x46, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x80, 0x02, 0x02, 0x00, 0xff, 0x00, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x96, 0x02,
        0x02, 0x00, 0xff, 0x00, 0x84, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9e, 0x02, 0x02, 0x00, 0xff, 0x00,
        0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa6, 0x02, 0x02, 0x00, 0xff, 0x00, 0x88, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xae, 0x02, 0x02, 0x00, 0xff, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb6, 0x02,
        0x02, 0x00, 0xff, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x02, 0x02, 0x00, 0xff, 0x01,
        0x83, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x02, 0x1b, 0x00, 0x45, 0xba, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xce, 0x02, 0x1d, 0x07, 0xad, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd6, 0x02,
        0x25, 0x03, 0x01, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0xde, 0x02, 0x25, 0x03, 0x0b, 0x00,
        0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe6, 0x02, 0x2a, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xee, 0x02, 0x2a, 0x00, 0x1a, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf6, 0x02,
        0x46, 0x02, 0x84, 0xd0, 0x20, 0x02, 0x31, 0x00, 0x00, 0x00, 0xfe, 0x02, 0x75, 0x00, 0x1e, 0x0e,
        0x42, 0x4c, 0xfe, 0x01, 0x00, 0x00, 0x06, 0x03, 0x7a, 0x00, 0x3b, 0x20, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x0e, 0x03, 0x82, 0x02, 0xfa, 0x05, 0xbf, 0x40, 0x05, 0x00, 0x00, 0x00, 0x1d, 0x03,
        0x82, 0x02, 0xfc, 0x03, 0xfe, 0x01, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x03, 0x90, 0x06, 0x03, 0x00,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x57, 0x03, 0x90, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x5f, 0x03, 0x9a, 0x06, 0xf6, 0x81, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x03,
        0xbf, 0x04, 0xcc, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8b, 0x03, 0xcd, 0x02, 0x14, 0x08,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x93, 0x03, 0xcd, 0x02, 0x30, 0x04, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x9b, 0x03, 0xcd, 0x02, 0x30, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa3, 0x03,
        0xcd, 0x02, 0x30, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xab, 0x03, 0xcd, 0x02, 0x30, 0x20,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb3, 0x03, 0xcd, 0x02, 0x30, 0x24, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xc2, 0x03, 0xcd, 0x02, 0x31, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb, 0x03,
        0xcd, 0x02, 0x33, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x04, 0xcd, 0x02, 0x33, 0x02,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x04, 0xcd, 0x02, 0x33, 0x04, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x2f, 0x04, 0xcd, 0x02, 0x33, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4c, 0x04,
        0xcd, 0x02, 0x33, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5b, 0x04, 0xcd, 0x02, 0x33, 0x20,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x04, 0xcd, 0x02, 0x36, 0x3a, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x6e, 0x05, 0xcd, 0x02, 0x37, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0x05,
        0xcd, 0x02, 0x37, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x85, 0x05, 0xcd, 0x02, 0x72, 0x01,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x05, 0xd2, 0x02, 0xcc, 0x4b, 0x00, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xa3, 0x05, 0xd2, 0x02, 0xcc, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb2, 0x05,
        0xd2, 0x02, 0xcc, 0x8d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc1, 0x05, 0xd7, 0x02, 0x40, 0x4a,
        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc9, 0x05, 0xdc, 0x02, 0xf6, 0x09, 0x03, 0x00, 0x00, 0x00,
        0x00, 0x00, 0xdf, 0x05, 0xdc, 0x02, 0xff, 0x00, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe7, 0x05,
        0x01, 0x7e, 0x12, 0x2c, 0xe8, 0x0c, 0x46, 0x00, 0x01, 0x7a, 0x20, 0x00, 0xaf, 0x30, 0x4c, 0x00,
        0x02, 0x62, 0x2c, 0x4a, 0xb4, 0x33, 0x50, 0x00, 0xa4, 0x20, 0x87, 0xfb, 0x30, 0x52, 0x00, 0x05,
        0x5c, 0x2d, 0xdb, 0xc4, 0x33, 0x46, 0x00, 0x39, 0x2d, 0x78, 0xc2, 0x33, 0x4c, 0x00, 0x4d, 0x12,
        0x75, 0x98, 0x0c, 0x50, 0x00, 0x98, 0x20, 0xca, 0xf0, 0x30, 0x4c, 0x00, 0x9f, 0x20, 0x44, 0xfa,
        0x30, 0x5c, 0x00, 0x01, 0x62, 0x12, 0x51, 0x9c, 0x0c, 0x50, 0x00, 0x01, 0x52, 0x12, 0x9a, 0x99,
        0x0c, 0x5a, 0x00, 0x01, 0x3c, 0x2f, 0xe7, 0xdd, 0x35, 0x5a, 0x00, 0x01, 0xf8, 0x2c, 0x5f, 0xbe,
        0x33, 0x46, 0x00, 0x01, 0x7d, 0x12, 0xf0, 0xe7, 0x0c, 0x3c, 0x00, 0x01, 0x64, 0x12, 0xa1, 0x9c,
        0x0c, 0x46, 0x00, 0x01, 0x67, 0x12, 0x76, 0x9d, 0x0c, 0x52, 0x00, 0x01, 0x80, 0x20, 0x8d, 0xb0,
        0x30, 0x32, 0x00, 0x01, 0x5c, 0x12, 0x34, 0x9b, 0x0c, 0x46, 0x00, 0x02, 0x51, 0x12, 0x4a, 0x99,
        0x0c, 0x50, 0x00, 0x27, 0x20, 0x94, 0x6d, 0x30, 0x50, 0x00, 0x04, 0x6a, 0x12, 0xfd, 0x9d, 0x0c,
        0x5a, 0x00, 0x53, 0x12, 0xf4, 0x99, 0x0c, 0x46, 0x00, 0x5d, 0x12, 0x7a, 0x9b, 0x0c, 0x5a, 0x00,
        0xa3, 0x20, 0x37, 0xfb, 0x30, 0x50, 0x00, 0x03, 0x71, 0x20, 0x8d, 0x74, 0x30, 0x68, 0x00, 0x72,
        0x20, 0xf5, 0x74, 0x30, 0x62, 0x00, 0x74, 0x20, 0x57, 0x75, 0x30, 0x56, 0x00, 0x01, 0x6f, 0x20,
        0xd6, 0x73, 0x30, 0x66, 0x00, 0x01, 0x50, 0x12, 0x04, 0x99, 0x0c, 0x46, 0x00, 0x01, 0x93, 0x20,
        0x9e, 0xef, 0x30, 0x3c, 0x00, 0x01, 0x83, 0x20, 0xbf, 0xb0, 0x30, 0x50, 0x00, 0x01, 0x71, 0x1f,
        0xb0, 0x6d, 0x2e, 0x4c, 0x00, 0x01, 0xe0, 0x1d, 0x4c, 0x03, 0x2a, 0x70, 0x00, 0x01, 0xf3, 0x2c,
        0xff, 0xbd, 0x33, 0x60, 0x00, 0x03, 0xad, 0x2c, 0x45, 0xb9, 0x33, 0x5a, 0x00, 0xb2, 0x2c, 0x9f,
        0xb9, 0x33, 0x5a, 0x00, 0xa6, 0x20, 0xd9, 0xfb, 0x30, 0x60, 0x00, 0x02, 0xb7, 0x2c, 0xf9, 0xb9,
        0x33, 0x56, 0x00, 0xbc, 0x2c, 0x4f, 0xba, 0x33, 0x5a, 0x00, 0x01, 0x66, 0x12, 0x26, 0x9d, 0x0c,
        0x50, 0x00, 0x01, 0x25, 0x2d, 0x10, 0xc1, 0x33, 0x5a, 0x00, 0x01, 0x3e, 0x2d, 0xc4, 0xc2, 0x33,
        0x5a, 0x00, 0x06, 0x67, 0x2c, 0x9a, 0xb4, 0x33, 0x5a, 0x00, 0x6c, 0x2c, 0xf4, 0xb4, 0x33, 0x5a,
        0x00, 0xa3, 0x2c, 0x91, 0xb8, 0x33, 0x5a, 0x00, 0xdf, 0x2c, 0xa1, 0xbc, 0x33, 0x5a, 0x00, 0xe4,
        0x2c, 0xfb, 0xbc, 0x33, 0x5a, 0x00, 0xfd, 0x15, 0x49, 0xf3, 0x18, 0x46, 0x00, 0x02, 0x2f, 0x2d,
        0xc4, 0xc1, 0x33, 0x5a, 0x00, 0x52, 0x2d, 0x2c, 0xc4, 0x33, 0x5a, 0x00, 0x01, 0x84, 0x2d, 0x61,
        0xc7, 0x33, 0x5a, 0x00, 0x01, 0x8c, 0x12, 0x23, 0x0b, 0x0d, 0x50, 0x00, 0x01, 0x48, 0x2d, 0x78,
        0xc3, 0x33, 0x5a, 0x00, 0x01, 0x34, 0x2d, 0x1e, 0xc2, 0x33, 0x5a, 0x00, 0x01, 0x6a, 0x20, 0x2c,
        0x73, 0x30, 0x5a, 0x00, 0x01, 0x7e, 0x20, 0x01, 0xb0, 0x30, 0x50, 0x00, 0x01, 0x7f, 0x20, 0x51,
        0xb0, 0x30, 0x3c, 0x00, 0x03, 0xfc, 0x1f, 0xee, 0x86, 0x2f, 0x50, 0x00, 0x1d, 0x1f, 0x9a, 0xe6,
        0x2d, 0x3c, 0x00, 0x1e, 0x1f, 0xd6, 0xe6, 0x2d, 0x58, 0x00, 0x02, 0x46, 0x12, 0xec, 0x96, 0x0c,
        0x5a, 0x00, 0x2a, 0x2d, 0x6a, 0xc1, 0x33, 0x5a, 0x00, 0x05, 0x37, 0x2f, 0xa1, 0xdd, 0x35, 0x46,
        0x00, 0x84, 0x12, 0x41, 0xf4, 0x0c, 0x3c, 0x00, 0x1b, 0x2d, 0x84, 0xc0, 0x33, 0x46, 0x00, 0x43,
        0x2d, 0x1e, 0xc3, 0x33, 0x5a, 0x00, 0x94, 0x20, 0xda, 0xef, 0x30, 0x50, 0x00, 0x02, 0x70, 0x1f,
        0x5c, 0x6d, 0x2e, 0x54, 0x00, 0x9d, 0x20, 0xa4, 0xf9, 0x30, 0x50, 0x00, 0x03, 0xa8, 0x2c, 0xeb,
        0xb8, 0x33, 0x5a, 0x00, 0xe9, 0x2c, 0x55, 0xbd, 0x33, 0x5a, 0x00, 0xcb, 0x2c, 0x43, 0xbb, 0x33,
        0x5a, 0x00, 0x01, 0x07, 0x2d, 0x4a, 0xbf, 0x33, 0x50, 0x00, 0x01, 0x4d, 0x2d, 0xd2, 0xc3, 0x33,
        0x5a, 0x00, 0x01, 0x8b, 0x20, 0x2c, 0xee, 0x30, 0x50, 0x00, 0x01, 0xd0, 0x2c, 0x9d, 0xbb, 0x33,
        0x5a, 0x00, 0x01, 0x5b, 0x12, 0xe4, 0x9a, 0x0c, 0x50, 0x00, 0x01, 0x47, 0x12, 0x46, 0x97, 0x0c,
        0x50, 0x00, 0x01, 0x8a, 0x12, 0xd3, 0x0a, 0x0d, 0x50, 0x00, 0x01, 0x99, 0x20, 0x16, 0xf1, 0x30,
        0x60, 0x00, 0x01, 0x73, 0x12, 0xc1, 0xd3, 0x0c, 0x5a, 0x00, 0x03, 0x75, 0x12, 0x62, 0xd4, 0x0c,
        0x5a, 0x00, 0x1c, 0x20, 0xa3, 0x12, 0x30, 0x50, 0x00, 0x8f, 0x20, 0x1c, 0xef, 0x30, 0x50, 0x00,
        0x03, 0x55, 0x12, 0x3a, 0x9a, 0x0c, 0x5a, 0x00, 0x8a, 0x20, 0xd2, 0xed, 0x30, 0x5a, 0x00, 0x92,
        0x20, 0x6c, 0xef, 0x30, 0x32, 0x00, 0x01, 0x83, 0x12, 0xf1, 0xf3, 0x0c, 0x50, 0x00, 0x01, 0x56,
        0x12, 0x94, 0x9a, 0x0c, 0x50, 0x00, 0x01, 0x88, 0x12, 0x14, 0xf5, 0x0c, 0x46, 0x00, 0x01, 0xd5,
        0x2c, 0xf7, 0xbb, 0x33, 0x5a, 0x00, 0x01, 0x41, 0x2f, 0x41, 0xde, 0x35, 0x5a, 0x00, 0x01, 0x0c,
        0x2d, 0x9a, 0xbf, 0x33, 0x50, 0x00, 0x01, 0x7a, 0x12, 0x5e, 0xe7, 0x0c, 0x46, 0x00, 0x01, 0x6e,
        0x12, 0xfc, 0x9e, 0x0c, 0x3d, 0x00, 0x01, 0x9c, 0x20, 0xc6, 0xf1, 0x30, 0xde, 0x07, 0x01, 0x98,
        0x1f, 0x16, 0x74, 0x2e, 0xbf, 0x01, 0x01, 0x09, 0x1f, 0x9c, 0xce, 0x2d, 0x79, 0x01, 0x01, 0x49,
        0x12, 0xeb, 0x97, 0x0c, 0x4b, 0x00, 0x01, 0x61, 0x12, 0x12, 0x9c, 0x0c, 0x3f, 0x00, 0x01, 0x2e,
        0x1e, 0x7c, 0x28, 0x2a, 0x6c, 0x00, 0x01, 0x7c, 0x20, 0xb0, 0xaf, 0x30, 0x51, 0x00, 0x02, 0x5d,
        0x2c, 0xef, 0xb3, 0x33, 0x5b, 0x00, 0x75, 0x2d, 0x66, 0xc6, 0x33, 0x5b, 0x00, 0x02, 0xf0, 0x1f,
        0xf2, 0x38, 0x2f, 0x60, 0x00, 0x7a, 0x1d, 0x9f, 0xe0, 0x28, 0x6c, 0x00, 0x06, 0x4e, 0x2c, 0x04,
        0xb3, 0x33, 0x6c, 0x00, 0x54, 0x1f, 0xc4, 0x15, 0x2e, 0x54, 0x00, 0x71, 0x2c, 0x4e, 0xb5, 0x33,
        0x58, 0x00, 0xf3, 0x1f, 0x52, 0x39, 0x2f, 0x6c, 0x00, 0x78, 0x12, 0xd7, 0xe6, 0x0c, 0x58, 0x00,
        0x7b, 0x20, 0x4c, 0xaf, 0x30, 0x64, 0x00, 0x01, 0x9f, 0x1f, 0xd5, 0x75, 0x2e, 0x73, 0x00, 0x01,
        0xea, 0x1d, 0xca, 0x10, 0x2a, 0xa3, 0x00, 0x05, 0xf9, 0x1f, 0x54, 0x86, 0x2f, 0x45, 0x00, 0x60,
        0x1c, 0xfd, 0x8d, 0x25, 0x4d, 0x00, 0x0a, 0x1f, 0x15, 0xd0, 0x2d, 0x4d, 0x00, 0x17, 0x20, 0x60,
        0xf2, 0x2f, 0x49, 0x00, 0x70, 0x20, 0x3c, 0x74, 0x30, 0x51, 0x00, 0x01, 0x79, 0x12, 0x2f, 0xe7,
        0x0c, 0x2f, 0x00, 0x01, 0x8f, 0x12, 0xba, 0x0b, 0x0d, 0x35, 0x00, 0x01, 0x65, 0x12, 0xe7, 0x9c,
        0x0c, 0x3f, 0x00, 0x01, 0x7f, 0x12, 0x72, 0xe8, 0x0c, 0x47, 0x00, 0x01, 0x69, 0x12, 0xc8, 0x9d,
        0x0c, 0x35, 0x00, 0x02, 0x4c, 0x12, 0x36, 0x98, 0x0c, 0x3f, 0x00, 0x4e, 0x12, 0xc5, 0x98, 0x0c,
        0x3f, 0x00, 0x08, 0x99, 0x2c, 0xf1, 0xb7, 0x33, 0x50, 0x00, 0x80, 0x2c, 0x46, 0xb6, 0x33, 0x50,
        0x00, 0x9e, 0x2c, 0x41, 0xb8, 0x33, 0x50, 0x00, 0x7b, 0x2c, 0xf6, 0xb5, 0x33, 0x50, 0x00, 0xda,
        0x2c, 0x51, 0xbc, 0x33, 0x50, 0x00, 0x66, 0x2d, 0x71, 0xc5, 0x33, 0x50, 0x00, 0xc6, 0x2c, 0xf3,
        0xba, 0x33, 0x50, 0x00, 0x7f, 0x2d, 0x11, 0xc7, 0x33, 0x50, 0x00, 0x01, 0x53, 0x2c, 0x70, 0xb3,
        0x33, 0x47, 0x00, 0x03, 0x8f, 0x2c, 0x51, 0xb7, 0x33, 0x50, 0x00, 0x6b, 0x2d, 0xc1, 0xc5, 0x33,
        0x50, 0x00, 0x16, 0x2d, 0x34, 0xc0, 0x33, 0x50, 0x00, 0x03, 0x02, 0x2d, 0xfa, 0xbe, 0x33, 0x50,
        0x00, 0x44, 0x2c, 0x6d, 0xb2, 0x33, 0x50, 0x00, 0x49, 0x2c, 0xbd, 0xb2, 0x33, 0x47, 0x00, 0x04,
        0x0c, 0x1f, 0x62, 0xd0, 0x2d, 0x5a, 0x00, 0x35, 0x2c, 0x8c, 0xb1, 0x33, 0x47, 0x00, 0x76, 0x12,
        0xbc, 0xd4, 0x0c, 0x47, 0x00, 0x9a, 0x20, 0x76, 0xf1, 0x30, 0x50, 0x00, 0x02, 0xa0, 0x12, 0xc9,
        0x50, 0x0d, 0x4c, 0x00, 0x97, 0x20, 0x7a, 0xf0, 0x30, 0x50, 0x00, 0x0c, 0x24, 0x12, 0x62, 0xd7,
        0x0b, 0x55, 0x00, 0x85, 0x2c, 0x96, 0xb6, 0x33, 0x55, 0x00, 0x70, 0x2d, 0x11, 0xc6, 0x33, 0x55,
        0x00, 0x03, 0x12, 0x2e, 0xca, 0x0b, 0x4c, 0x00, 0x51, 0x0a, 0xea, 0x13, 0x06, 0x55, 0x00, 0xf7,
        0x1f, 0xb3, 0x85, 0x2f, 0x55, 0x00, 0xac, 0x1f, 0xe7, 0x8f, 0x2e, 0x55, 0x00, 0x49, 0x1f, 0x31,
        0x15, 0x2e, 0x55, 0x00, 0x8e, 0x12, 0x73, 0x0b, 0x0d, 0x47, 0x00, 0x6c, 0x12, 0xa7, 0x9e, 0x0c,
        0x55, 0x00, 0x85, 0x12, 0x7d, 0xf4, 0x0c, 0x50, 0x00, 0xa1, 0x20, 0xa0, 0xfa, 0x30, 0x47, 0x00,
        0x1b, 0x12, 0x2c, 0xfc, 0xaf, 0x33, 0x50, 0x00, 0x57, 0x2d, 0x86, 0xc4, 0x33, 0x55, 0x00, 0xf5,
        0x1f, 0x5e, 0x85, 0x2f, 0x55, 0x00, 0x76, 0x2c, 0xa6, 0xb5, 0x33, 0x50, 0x00, 0x26, 0x2c, 0x9c,
        0xb0, 0x33, 0x5a, 0x00, 0xbd, 0x1f, 0x8e, 0xe8, 0x2e, 0x50, 0x00, 0xee, 0x2c, 0xaf, 0xbd, 0x33,
        0x50, 0x00, 0x61, 0x2d, 0x21, 0xc5, 0x33, 0x50, 0x00, 0x7a, 0x2d, 0xc1, 0xc6, 0x33, 0x50, 0x00,
        0x43, 0x12, 0x9c, 0x96, 0x0c, 0x50, 0x00, 0x94, 0x2c, 0xa1, 0xb7, 0x33, 0x50, 0x00, 0xf8, 0x1f,
        0x08, 0x86, 0x2f, 0x4c, 0x00, 0x71, 0x12, 0x0c, 0xc5, 0x0c, 0x3e, 0x00, 0x17, 0x2c, 0x4c, 0xb0,
        0x33, 0x50, 0x00, 0xfa, 0x1f, 0x99, 0x86, 0x2f, 0x55, 0x00, 0xf3, 0x2f, 0x5f, 0x3f, 0x36, 0x50,
        0x00, 0x55, 0x1e, 0x3c, 0xba, 0x2a, 0x47, 0x00, 0x74, 0x12, 0x1b, 0xd4, 0x0c, 0x47, 0x00, 0x82,
        0x12, 0xaa, 0xf3, 0x0c, 0x47, 0x00, 0x48, 0x12, 0x96, 0x97, 0x0c, 0x55, 0x00, 0x2b, 0x2c, 0xf6,
        0xb0, 0x33, 0x47, 0x00, 0x6b, 0x12, 0x57, 0x9e, 0x0c, 0x50, 0x00, 0x87, 0x12, 0xcd, 0xf4, 0x0c,
        0x47, 0x00, 0x6c, 0x20, 0x86, 0x73, 0x30, 0x50, 0x00, 0x8d, 0x20, 0x7c, 0xee, 0x30, 0x50, 0x00,
        0x8e, 0x20, 0xcc, 0xee, 0x30, 0x50, 0x00, 0x9e, 0x20, 0xf4, 0xf9, 0x30, 0x50, 0x00, 0x01, 0x5f,
        0x12, 0xd4, 0x9b, 0x0c, 0x3e, 0x00, 0x02, 0x4e, 0x1f, 0x86, 0x15, 0x2e, 0x3e, 0x00, 0x52, 0x20,
        0xe4, 0x6d, 0x30, 0x52, 0x00, 0x03, 0x3a, 0x2c, 0xd3, 0xb1, 0x33, 0x50, 0x00, 0xfd, 0x2c, 0xa5,
        0xbe, 0x33, 0x55, 0x00, 0x95, 0x20, 0x2a, 0xf0, 0x30, 0x50, 0x00, 0x01, 0xa2, 0x20, 0xe7, 0xfa,
        0x30, 0x50, 0x00, 0x02, 0xc1, 0x2c, 0xa9, 0xba, 0x33, 0x4a, 0x00, 0x11, 0x2d, 0xea, 0xbf, 0x33,
        0x4a, 0x00, 0x02, 0x30, 0x2c, 0x3d, 0xb1, 0x33, 0x4f, 0x00, 0x3f, 0x2c, 0x23, 0xb2, 0x33, 0x4a,
        0x00, 0x01, 0x58, 0x2c, 0xb7, 0xb3, 0x33, 0x38, 0x00, 0x03, 0x8a, 0x2c, 0xeb, 0xb6, 0x33, 0x66,
        0x00, 0xfd, 0x1f, 0x3e, 0x87, 0x2f, 0x6c, 0x00, 0xfe, 0x1f, 0xaa, 0x87, 0x2f, 0x72, 0x00, 0x01,
        0x7b, 0x12, 0xa4, 0xe7, 0x0c, 0x4c, 0x00, 0x01, 0x20, 0x2d, 0xca, 0xc0, 0x33, 0x46, 0x00

};

int my_strcmp(const char *str1, const char *str2)
{
    do
    {
        if (str1 == NULL || str2 == NULL)
            return 1;
        if (*str2 == '\0')
            return 0;
    } while (*str1++ == *str2++);
    return 1;
}

int get_remote_flag(unsigned char device_type)
{
    int ret = 0;
    ;

    if (device_type == IR_DEV_AIR_COND)
    {
        ret = remote_data._flag;
    }
    if (device_type == IR_DEV_FAN_DEVICE)
    {
        ret = remote_fan_data._flag;
    }
    return ret;
}

static unsigned short trans_pulse(unsigned short *out, unsigned short ret_num,
                                  unsigned short frequency, unsigned char frame_count)
{
    unsigned short i;
    int pattern_value;
    double pulse;

    pulse = (double)1000000 / frequency;
    for (i = 0; i < ret_num; i++)
    {
        pattern_value = pulse * out[i];
        if (pattern_value > 0xFFFF)
        {
            pattern_value = 0xFFFF;
        }

        out[i] = pattern_value;
    }

    if (frame_count > 1)
    {
        for (i = 1; i < frame_count; i++)
        {
            memcpy(&out[ret_num * i], out, ret_num * sizeof(out[0]));
        }
    }

    return ret_num * frame_count;
}

static int pwmr_send_wave(unsigned short *out, int length, unsigned short frequency, unsigned char frame_count)
{
	int ret;
	
	ret = infrared_tx_init(2, WM_IO_PB_02);
	if(ret)
	{
		printf("infrared tx init failed\n");
		goto end;
	}
	ret = infrared_tx(out, length);
	printf("infrared tx len %d\n", ret);
end:
	infrared_tx_deinit();
	return ret;
}

/**
 * @brief 遥控器功能支持信息获取
 * @param[in] {AIR_STA_T air_ctr}    空调遥控器状态
 * @param[out] {wind_direct_flag}    风向支持
 * @return 0: OK    -1:获取数据失败 -2：不支持的模式 -3：不支持的温度 -4：不支持的风速 
 */
int remote_support_info(AIR_STA_T air_ctr, unsigned char *wind_direct_flag)
{
    int ret = 0;
    int i = 0;

    unsigned char t_max = 0;
    unsigned char t_min = 0;
    unsigned char wind = 0;
    unsigned short info[5] = {0};
    ret = get_ac_info(remote_ptr_data, remote_data._len, info, wind_direct_flag);
    if (ret < 0)
    {
        printf("\nGet info error!!!\n");
        return -1;
    }
#ifdef LOG_TEST
    printf("\nGet data:\nwind_direct_flag %d;", *wind_direct_flag);
    for (int i = 0; i < 5; i++)
    {
        printf("%02X;", info[i]);
    }
    printf("info mode : %d; %02X\n", air_ctr._mode, info[air_ctr._mode]);
#endif
    if (info[air_ctr._mode] == 0)
    {
        return -2;
    }

    t_min = (info[air_ctr._mode] & 0x0F) + 16;
    t_max = ((info[air_ctr._mode] >> 4) & 0x0F) + 16;
    if (air_ctr._temperature < t_min || air_ctr._temperature > t_max || t_min == t_max)
    {
        return -3;
    }

    wind = (info[air_ctr._mode] >> 8) & 0x0F;
    for (; i < 4; i++)
    {
        if ((wind & 0x01) != 1)
        {
            if (air_ctr._wind_speed == i)
            {
                return -4;
            }
        }
        wind = wind >> 1;
    }
    return 0;
}

/**
 * @brief 空调开关控制
 * @param[in] {AIR_STA_T air_ctr}    空调遥控器状态
 * @return 0: OK    -1:没有可用的遥控器，需要先匹配  -2：获取遥控码失败
 */
int air_power_switch(AIR_STA_T air_ctr)
{
    unsigned short *out = NULL;
    unsigned short ret_num = 0;
    unsigned char frame_count = 0;
    int ret = 0;
    if (remote_ptr_data == NULL)
    {
        printf("\nPlease match the remote control first\n");
        return -1;
    }
	out = aos_malloc(1024*sizeof(unsigned short));
	if(out == NULL)
	{
        printf("\nMalloc error\n");
		return -1;
	}
    ret = get_ac_power_pulse(remote_ptr_data, remote_data._len,
                             air_ctr._power,
                             &air_ctr._frequency,
                             out,
                             1024,
                             &ret_num, &frame_count);

    if (ret < 0)
    {
        printf("Get air power data error !!!\n");
		aos_free(out);
        return -2;
    }
#ifdef LOG_TEST
    printf("\nAIR STA :_power>%d ,_mode>%d ,_temperature>%d ,_wind_speed>%d ,_wind_direction>%d ,_frequency>%d, \nret_num : %d ; frame_count : %d \n",
           air_ctr._power, air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed, air_ctr._wind_direction, air_ctr._frequency, ret_num, frame_count);
#endif
    ret_num = trans_pulse(out, ret_num, air_ctr._frequency, frame_count);
    
    ret = pwmr_send_wave(out, (unsigned int)ret_num, (unsigned int)air_ctr._frequency, 1);

	aos_free(out);
    return ret;
}

/**
 * @brief 空调风向控制
 * @param[in] {AIR_STA_T air_ctr}    空调遥控器状态
 * @param[in] {wind_direct_flag}     风向支持标志位
 * @return 0: OK    -1:没有可用的遥控器，需要先匹配  -2：获取遥控码失败
 */
int air_direct_ctrl(AIR_STA_T air_ctr, unsigned char wind_direct_flag)
{
    unsigned short *out = NULL;
    unsigned short ret_num = 0;
    unsigned char frame_count = 0;
    int ret = 0;

    if (remote_ptr_data == NULL)
    {
        printf("\nPlease match the remote control first !!!\n");
        return -1;
    }
	
	out = aos_malloc(1024*sizeof(unsigned short));
	if(out == NULL)
	{
        printf("\nMalloc error\n");
		return -1;
	}

    if (wind_direct_flag == 0)
    {
    	aos_free(out);
        return -1;
    }
    else if (wind_direct_flag == 1)
    {
        if (air_ctr._sync == 0)
        {
            ret = get_ac_state_pulse(remote_ptr_data, remote_data._len,
                                     air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed,
                                     1, NULL,
                                     &air_ctr._frequency,
                                     out,
                                     1024,
                                     &ret_num,
                                     &frame_count);
            if (ret < 0)
            {
            	aos_free(out);
                printf("\nGet data error..Support fixed wind direction..sync!!!\n");
                return -2;
            }
            wind_direct_flag = 0;
#ifdef LOG_TEST
            printf("\nSupport fixed wind direction..sync..\n");
#endif
        }
        else
        {
            ret = get_ac_state_pulse(remote_ptr_data, remote_data._len,
                                     air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed,
                                     1, &wind_direct_flag,
                                     &air_ctr._frequency,
                                     out,
                                     1024,
                                     &ret_num,
                                     &frame_count);
            if (ret < 0)
            {
            	aos_free(out);
                printf("\nGet data error..Support fixed wind direction!!!\n");
                return -2;
            }
#ifdef LOG_TEST
            printf("\nSupport fixed wind direction..\n");
#endif
        }
    }
    else if (wind_direct_flag == 2)
    {
        if (air_ctr._sync == 0)
        {
            wind_direct_flag = 0;
            ret = get_ac_state_pulse(remote_ptr_data, remote_data._len,
                                     air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed,
                                     air_ctr._wind_direction, &wind_direct_flag,
                                     &air_ctr._frequency,
                                     out,
                                     1024,
                                     &ret_num,
                                     &frame_count);
            if (ret < 0)
            {
            	aos_free(out);
                printf("\nGet data error ..Support the direction of the wind..sync!!!\n");
                return -2;
            }

#ifdef LOG_TEST
            printf("\nSupport the direction of the wind..sync..\n");
#endif
        }
        else
        {
            wind_direct_flag = 1;
            ret = get_ac_state_pulse(remote_ptr_data, remote_data._len,
                                     air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed,
                                     air_ctr._wind_direction, &wind_direct_flag,
                                     &air_ctr._frequency,
                                     out,
                                     1024,
                                     &ret_num,
                                     &frame_count);
            if (ret < 0)
            {
            	aos_free(out);
                printf("\nGet data error ..Support the direction of the wind!!!\n");
                return -2;
            }
#ifdef LOG_TEST
            printf("\nSupport the direction of the wind..\n");
#endif
        }
    }
#ifdef LOG_TEST
    printf("\nAIR STA :_power>%d ,_mode>%d ,_temperature>%d ,_wind_speed>%d ,_wind_direction>%d ,_frequency>%d, \nret_num : %d ; frame_count : %d \n",
           air_ctr._power, air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed, air_ctr._wind_direction, air_ctr._frequency, ret_num, frame_count);
#endif
    ret_num = trans_pulse(out, ret_num, air_ctr._frequency, frame_count);
    
    pwmr_send_wave(out, (unsigned int)ret_num, (unsigned int)air_ctr._frequency, 1);

    if (wind_direct_flag == 1 && air_ctr._sync == 0)
    {
#ifdef LOG_TEST
        printf("Get the data again and send it");
#endif
        ret = get_ac_state_pulse(remote_ptr_data, remote_data._len,
                                 air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed,
                                 air_ctr._wind_direction, &wind_direct_flag,
                                 &air_ctr._frequency,
                                 out,
                                 1024,
                                 &ret_num,
                                 &frame_count);
        if (ret < 0)
        {
        	aos_free(out);
            printf("\nGet data error ..Get the data again and send it!!!\n");
            return -2;
        }
        aos_msleep(780);
        ret_num = trans_pulse(out, ret_num, air_ctr._frequency, frame_count);
        
        pwmr_send_wave(out, (unsigned int)ret_num, (unsigned int)air_ctr._frequency, 1);
    }
	aos_free(out);
    return 0;
}

/**
 * @brief 空调状态控制
 * @param[in] {AIR_STA_T air_ctr}    空调遥控器状态
 * @param[in] {wind_direct_flag}     风向支持标志位
 * @return 0: OK    -1:没有可用的遥控器，需要先匹配  -2：获取遥控码失败
 */
int air_control(AIR_STA_T air_ctr, unsigned char wind_direct_flag)
{
    unsigned short *out = NULL;
    unsigned short ret_num = 0;
    unsigned char frame_count = 0;
    int ret = 0;

    if (remote_ptr_data == NULL)
    {
        printf("\nPlease match the remote control first !!!\n");
        return -1;
    }

    unsigned char temp_direction = 0;

	out = aos_malloc(1024*sizeof(unsigned short));
	if(out == NULL)
	{
        printf("\nMalloc error\n");
		return -1;
	}

    if (wind_direct_flag == 1)
    {
        temp_direction = 1;
    }
    else if (wind_direct_flag == 2)
    {
        temp_direction = air_ctr._wind_direction;
    }
    else
    {
        temp_direction = 0;
    }

    ret = get_ac_state_pulse(remote_ptr_data, remote_data._len,
                             air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed,
                             temp_direction, NULL,
                             &air_ctr._frequency,
                             out,
                             1024,
                             &ret_num,
                             &frame_count);
    if (ret < 0)
    {
    	aos_free(out);
        printf("\nGet data error..Air condition control!!!\n");
        return -2;
    }
#ifdef LOG_TEST
    printf("\nAir condition control..\n");

    printf("\nAIR STA :_power>%d ,_mode>%d ,_temperature>%d ,_wind_speed>%d ,_wind_direction>%d ,_frequency>%d, \nret_num : %d ; frame_count : %d \n",
           air_ctr._power, air_ctr._mode, air_ctr._temperature, air_ctr._wind_speed, air_ctr._wind_direction, air_ctr._frequency, ret_num, frame_count);
#endif
    ret_num = trans_pulse(out, ret_num, air_ctr._frequency, frame_count);
    
    pwmr_send_wave(out, (unsigned int)ret_num, (unsigned int)air_ctr._frequency, 1);
	aos_free(out);
    return 0;
}

/**
 * @brief 学习空调红外码接口
 * @return 0: OK    -1:error
 */
int learn_pulse_start()
{
    int ret = 0;

    if (learn_ptr_data != NULL)
    {
        free(learn_ptr_data);
        learn_ptr_data = NULL;
    }
    learn_ptr_data = (unsigned int *)malloc(LEARN_CACHE_BUF * 4 + 40);
    if (learn_ptr_data == NULL)
    {
        printf("\nPointer to null!!!\n");
        return -1;
    }
    ret = infrared_learn_pwm(learn_ptr_data, LEARN_CACHE_BUF, 5000);
    if (ret <= 0)
    {
        if (learn_ptr_data != NULL)
        {
            free(learn_ptr_data);
            learn_ptr_data = NULL;
        }
        printf("\nLearn air error\n");
        return -1;
    }
    else
    {
    	ret_len = ret;
        //现在由于bug，学习到的数据最后少一个高电平，且，送给码库匹配的时候，数组的最后要加一个20ms的低电平
        if (ret_len < LEARN_CACHE_BUF - 1)
        {
            learn_ptr_data[ret_len++] = 2000;
        }
    }

    return 0;
}

/**
 * @brief 获取下一套遥控码
 * @param[in] {device_type}     设备号
 * @return 0: OK    -1:error
 */
int match_get_next_remote(unsigned char device_type)
{
    int ret = 0;
    REMOTE_PARA_T temp_remote;
    if (device_type == IR_DEV_AIR_COND)
    {
        if (get_remote_flag(IR_DEV_AIR_COND) == 0)
        {
            return -1;
        }
        temp_remote = remote_data;
    }
    else if (device_type == IR_DEV_FAN_DEVICE)
    {
        if (get_remote_flag(IR_DEV_FAN_DEVICE) == 0)
        {
            return -1;
        }
        temp_remote = remote_fan_data;
    }
    else
    {

        printf("\nDevice error!!!\n");
        return -1;
    }

    if (temp_remote._cur_num < temp_remote._num)
    {
        ret = get_next_remote(air_index_data, sizeof(air_index_data),
                              temp_remote._handle, &temp_remote._handle,
                              &temp_remote._id, &temp_remote._offset, &temp_remote._len);
        if (ret != 0)
        {
            printf("\nSearch match remote error ret = %d!!!\n", ret);
            return -1;
        }
        temp_remote._cur_num++;
    }
    else
    {
        printf("It's the last set of codes\n");
        return -1;
    }

    if (device_type == IR_DEV_AIR_COND)
    {

        remote_data._handle = temp_remote._handle;
        remote_data._id = temp_remote._id;
        remote_data._offset = temp_remote._offset;
        remote_data._len = temp_remote._len;
        remote_data._cur_num = temp_remote._cur_num;
        ret = save_remote_index_info(&remote_data, sizeof(remote_data), IR_DEV_AIR_COND);
        if (ret < 0)
        {
            printf("\nSave remote error: IR_DEV_AIR_COND\n");
        }
    }
    if (device_type == IR_DEV_FAN_DEVICE)
    {
        remote_fan_data._handle = temp_remote._handle;
        remote_fan_data._id = temp_remote._id;
        remote_fan_data._offset = temp_remote._offset;
        remote_fan_data._len = temp_remote._len;
        remote_fan_data._cur_num = temp_remote._cur_num;
        ret = save_remote_index_info(&remote_fan_data, sizeof(remote_fan_data), IR_DEV_FAN_DEVICE);
        if (ret < 0)
        {
            printf("\nSave remote error: IR_DEV_FAN_DEVICE\n");
        }
    }

#ifdef LOG_TEST
    printf("\nSearch_remote: ret=%d, remote_num=%d, remote_handle=%d, remote_id=%d, remote_data_offset=%d, remote_data_len=%d, remote_cur_num=%d\n",
           ret, temp_remote._num, temp_remote._handle, temp_remote._id, temp_remote._offset, temp_remote._len, temp_remote._cur_num);
#endif

    return 0;
}

/**
 * @brief 在码库匹配遥控器接口
 * @param[in] {device_type}     设备号
 * @return 0: OK    -1:error
 */
int match_remote_start(unsigned char device_type)
{
    int ret = 0;

    REMOTE_PARA_T temp_remote;

    if (learn_ptr_data == NULL)
    {
        printf("\nPointer to null!!!\n");
        return -1;
    }

    if (device_type != IR_DEV_AIR_COND && device_type != IR_DEV_FAN_DEVICE)
    {
        printf("\nDevice error!!!\n");
        return -1;
    } 
    printf("search len: %d\n",ret_len);
    ret = search_remote(air_index_data, sizeof(air_index_data),
                        (int *)learn_ptr_data, ret_len,
                        device_type,
                        &temp_remote._num, &temp_remote._handle,
                        &temp_remote._id, &temp_remote._offset, &temp_remote._len);
    if (ret != 0)
    {
        printf("\nSearch match remote error ret = %d!!!\n", ret);
        if (learn_ptr_data != NULL)
        {
            free(learn_ptr_data);
            learn_ptr_data = NULL;
        }
        return -1;
    }

    if (learn_ptr_data != NULL)
    {
        free(learn_ptr_data);
        learn_ptr_data = NULL;
    }

    //避免匹配失败导致之前的遥控数据被覆盖
    temp_remote._flag = 1;
    temp_remote._cur_num = 1;

    temp_remote._one_id = temp_remote._id;
    temp_remote._one_handle = temp_remote._handle;
    temp_remote._one_offset = temp_remote._offset;
    temp_remote._one_len = temp_remote._len;

    if (device_type == IR_DEV_AIR_COND)
    {
        remote_data = temp_remote;
        ret = save_remote_index_info(&remote_data, sizeof(remote_data), IR_DEV_AIR_COND);
        if (ret < 0)
        {
            printf("\nSave remote error: IR_DEV_AIR_COND\n");
        }
    }
    if (device_type == IR_DEV_FAN_DEVICE)
    {
        remote_fan_data = temp_remote;
        ret = save_remote_index_info(&remote_fan_data, sizeof(remote_fan_data), IR_DEV_FAN_DEVICE);
        if (ret < 0)
        {
            printf("\nSave remote error: IR_DEV_FAN_DEVICE\n");
        }
    }
#ifdef LOG_TEST
    printf("\nSearch_remote: ret=%d, remote_num=%d, remote_handle=%d, remote_id=%d, data_offset=%d, data_len=%d, cur_num=%d\n",
           ret, temp_remote._num, temp_remote._handle, temp_remote._id, temp_remote._offset, temp_remote._len, temp_remote._cur_num);
#endif

    return 0;
}

/**
 * @brief 在码库读取遥控器数据
 * @param[in] {device_type}     设备号
 * @return 0: OK    -1:error
 */
int read_remote_code(unsigned char device_type)
{
    int ret = 0;
    REMOTE_PARA_T temp_remote;

    if (device_type == IR_DEV_AIR_COND)
    {
        temp_remote = remote_data;
    }
    else if (device_type == IR_DEV_FAN_DEVICE)
    {
        temp_remote = remote_fan_data;
    }
    else
    {
        printf("\nDevice error!!!\n");
        return -1;
    }

    if (remote_ptr_data != NULL)
    {
        free(remote_ptr_data);
        remote_ptr_data = NULL;
    }

    remote_ptr_data = (unsigned char *)malloc(temp_remote._len + 40);
    if (remote_ptr_data == NULL)
    {
        printf("\nPointer to null!!!\n");
        return -1;
    }

    if (remote_ptr_data != NULL)
    {
        ret = app_extflash_read(SPI_FLASH_AIR_REMOTE_ADDR + (unsigned int)temp_remote._offset, remote_ptr_data, temp_remote._len);
        if (ret < 0)
        {
            printf("\nRead match remote error!!!\n");
            if (remote_ptr_data != NULL)
            {
                free(remote_ptr_data);
                remote_ptr_data = NULL;
            }
            return -1;
        }
    }
    else
    {
        printf("\nFailed to allocate memory space!!!\n");
        return -3;
    }

    return 0;
}

/**
 * @brief 储存遥控器索引
 * @param[in] {data}            数据
 * @param[in] {len}             长度
 * @param[in] {device_type}     设备号
 * @return 0: OK    -1:error
 */
int save_remote_index_info(void *data, unsigned int len, unsigned char device_type)
{
    int ret = 0;
    int addr = 0;

#ifdef LOG_TEST
    printf("\nSave remote size: %d\n", len);
#endif

    if (device_type == IR_DEV_AIR_COND)
    {
        addr = SPI_FLASH_REMOTE_ADDR;
    }
    else if (device_type == IR_DEV_FAN_DEVICE)
    {
        addr = SPI_FLASH_FAN_REMOTE_ADDR;
    }
    else
    {
        printf("\nDevice error!!!\n");
        return -1;
    }

    memcpy((char *)data, (char *)DATA_FLASH_KEY, strlen(DATA_FLASH_KEY));
    ret = app_extflash_write(addr, data, len);

    if (ret < 0)
    {
        return -1;
    }

    return 0;
}
/**
 * @brief 储存遥控器状态
 * @param[in] {data}            数据
 * @param[in] {len}             长度
 * @param[in] {device_type}     设备号
 * @return 0: OK    -1:error
 */
int save_user_sta_data(void *data, unsigned int len, unsigned char device_type)
{
    int ret = 0;
    int addr = 0;

#ifdef LOG_TEST
    printf("\nSave remote size: %d\n", len);
#endif

    if (device_type == IR_DEV_AIR_COND)
    {
        addr = SPI_FLASH_USER_AIR_DATA_ADDR;
    }
    else if (device_type == IR_DEV_FAN_DEVICE)
    {
        addr = SPI_FLASH_USER_FAN_DATA_ADDR;
    }
    else
    {
        printf("\nDevice error!!!\n");
        return -1;
    }

    memcpy((char *)data, (char *)DATA_FLASH_KEY, strlen(DATA_FLASH_KEY));
    ret = app_extflash_write(addr, data, len);

    if (ret < 0)
    {
        return -1;
    }

    return 0;
}

/**
 * @brief 释放遥控器空间
 */
void free_remote_code()
{
    if (remote_ptr_data != NULL)
    {
        free(remote_ptr_data);
        remote_ptr_data = NULL;
    }
}


int fan_control()
{
    FAN_INF_FLAG_T fan_flag;

    int ret = 0;
  //  ret  = get_fan_info(remote_ptr_data, remote_data._len,)
}
